Skip to content

Request: adding type hints and py.typed to setuptools_scm #501

@jamesbraza

Description

@jamesbraza

As I am sure the setuptools_scm maintainers are aware:

  • Type hints were added in PEP 484 in Python 3.5
  • Python3 <= 3.4 is basically deprecated Python 2.7 hangs on by a thread elsewhere

I use setuptools_scm as part of some type checked code (via mypy). From what I have seen, setuptools_scm:

  • Isn't type hinted
  • Doesn't have the requisite py.typed marker file per PEP 561
  • Supports Python 2.7 and 3.4+, per the tox.ini file

There is a similar ticket for setuptools: pypa/setuptools#2345

Any thoughts on adding support for type hints?

Aside: I'm not sure how one can add type hints and maintain support for Python 2.7 and 3.4.


Workaround

In the meantime, I am adding the following to my setup.cfg section for mypy:

[mypy-setuptools_scm.*]
ignore_missing_imports = True

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