Skip to content

duplicate-code triggering on type hints #25

Closed
@tekktrik

Description

@tekktrik

Pylint is triggering a failure for duplicate-code on the imports required for type hints. In this case, it triggers on the try-import-except block used to import modules needed only for typing but not operation.

Per conversation, we should look into a way to get avoiding this kind of pylint failure for duplicate code without having to disable it entirely in pre-commit-config.yaml

Current failure when duplicate-code is removed:

************* Module adafruit_funhouse.peripherals
adafruit_funhouse/peripherals.py:1:0: R0801: Similar lines in 2 files
==adafruit_funhouse.__init__:[38:46]
==adafruit_funhouse.network:[37:44]
    from adafruit_dotstar import DotStar
except ImportError:
    pass

__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_FunHouse.git"

 (duplicate-code)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions