Code Duplication    Length = 21-21 lines in 2 locations

mandos/entries/entries.py 2 locations

@@ 574-594 (lines=21) @@
571
572
573
class EntryGeneralFunction(Entry[DrugbankGeneralFunctionSearch]):
574
    @classmethod
575
    def run(
576
        cls,
577
        path: Path = EntryArgs.path,
578
        key: str = EntryArgs.key("inter.drugbank:target-fn"),
579
        to: Optional[Path] = EntryArgs.to,
580
        check: bool = EntryArgs.test,
581
        log: Optional[Path] = EntryArgs.log_path,
582
        quiet: bool = EntryArgs.quiet,
583
        verbose: bool = EntryArgs.verbose,
584
        no_setup: bool = EntryArgs.no_setup,
585
    ) -> Searcher:
586
        """
587
        General functions from DrugBank targets.
588
589
        OBJECT: Name of the general function (e.g. "Toxic substance binding")
590
591
        PREDICATE: against on target (e.g. "binder", "downregulator", or "agonist").
592
        """
593
        built = DrugbankGeneralFunctionSearch(key, Apis.Pubchem, {DrugbankTargetType.target})
594
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
595
596
597
class EntryDrugbankTransporter(Entry[DrugbankTargetSearch]):
@@ 550-570 (lines=21) @@
547
548
549
class EntryDrugbankTarget(Entry[DrugbankTargetSearch]):
550
    @classmethod
551
    def run(
552
        cls,
553
        path: Path = EntryArgs.path,
554
        key: str = EntryArgs.key("inter.drugbank:target"),
555
        to: Optional[Path] = EntryArgs.to,
556
        check: bool = EntryArgs.test,
557
        log: Optional[Path] = EntryArgs.log_path,
558
        quiet: bool = EntryArgs.quiet,
559
        verbose: bool = EntryArgs.verbose,
560
        no_setup: bool = EntryArgs.no_setup,
561
    ) -> Searcher:
562
        """
563
        Protein targets from DrugBank.
564
565
        OBJECT: Target name (e.g. "Solute carrier family 22 member 11") from DrugBank
566
567
        PREDICATE: Action (e.g. "binder", "downregulator", or "agonist")
568
        """
569
        built = DrugbankTargetSearch(key, Apis.Pubchem, {DrugbankTargetType.target})
570
        return cls._run(built, path, to, check, log, quiet, verbose, no_setup)
571
572
573
class EntryGeneralFunction(Entry[DrugbankGeneralFunctionSearch]):