Code Duplication    Length = 19-19 lines in 2 locations

gvm/protocols/gmpv208/gmpv208.py 1 location

@@ 4273-4291 (lines=19) @@
4270
4271
        return self._send_xml_command(cmd)
4272
4273
    def delete_note(
4274
        self, note_id: str, *, ultimate: Optional[bool] = False
4275
    ) -> Any:
4276
        """Deletes an existing note
4277
4278
        Arguments:
4279
            note_id: UUID of the note to be deleted.
4280
            ultimate: Whether to remove entirely,or to the trashcan.
4281
        """
4282
        if not note_id:
4283
            raise RequiredArgument(
4284
                function=self.delete_note.__name__, argument='note_id'
4285
            )
4286
4287
        cmd = XmlCommand("delete_note")
4288
        cmd.set_attribute("note_id", note_id)
4289
        cmd.set_attribute("ultimate", _to_bool(ultimate))
4290
4291
        return self._send_xml_command(cmd)
4292
4293
    def delete_override(
4294
        self, override_id: str, *, ultimate: Optional[bool] = False

gvm/protocols/gmpv7/gmpv7.py 1 location

@@ 2396-2414 (lines=19) @@
2393
2394
        return self._send_xml_command(cmd)
2395
2396
    def delete_note(
2397
        self, note_id: str, *, ultimate: Optional[bool] = False
2398
    ) -> Any:
2399
        """Deletes an existing note
2400
2401
        Arguments:
2402
            note_id: UUID of the note to be deleted.
2403
            ultimate: Whether to remove entirely,or to the trashcan.
2404
        """
2405
        if not note_id:
2406
            raise RequiredArgument(
2407
                function=self.delete_note.__name__, argument='note_id'
2408
            )
2409
2410
        cmd = XmlCommand("delete_note")
2411
        cmd.set_attribute("note_id", note_id)
2412
        cmd.set_attribute("ultimate", _to_bool(ultimate))
2413
2414
        return self._send_xml_command(cmd)
2415
2416
    def delete_override(
2417
        self, override_id: str, *, ultimate: Optional[bool] = False