Skip to content

Unable to suppress typechecker nitpicks #11

@jaraco

Description

@jaraco

When merging 3841656 from jaraco/skeleton#136, the tests started failing.

____________________________ backports/__init__.py _____________________________
1: error: Unused "type: ignore" comment  [unused-ignore]
_________________________________ test session _________________________________
mypy exited with status 1.
_____________________ backports/entry_points_selectable.py _____________________
24: error: Unused "type: ignore" comment  [unused-ignore]
26: error: "type: ignore" comment without error code (consider "type: ignore[attr-defined, no-redef]" instead)  [ignore-without-code]
31: error: Unused "type: ignore" comment  [unused-ignore]
35: error: Unused "type: ignore" comment  [unused-ignore]
38: error: Unused "type: ignore" comment  [unused-ignore]
39: error: Unused "type: ignore" comment  [unused-ignore]
41: error: "type: ignore" comment without error code (consider "type: ignore[import-not-found]" instead)  [ignore-without-code]

I fixed all the errors on Python 3.12 in 6413a18, but now tests fail on Python 3.8 and 3.9.

_____________________ backports/entry_points_selectable.py _____________________
38: error: Name "metadata" already defined (by an import)  [no-redef]
39: error: Incompatible import of "distributions" (imported name has type overloaded function, local name has type "Callable[[KwArg(Any)], Iterable[importlib_metadata.Distribution]]")  [assignment]
39: error: Incompatible import of "EntryPoint" (imported name has type "Type[importlib.metadata.EntryPoint]", local name has type "Type[importlib_metadata.EntryPoint]")  [assignment]
41: error: Unused "type: ignore" comment  [unused-ignore]

@Avasam Can you work out a solution to get mypy checks to pass on all Python versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions