jsocol / jsocol/pystatsd

Type hints & PEP 561 packaging

Open
#146 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help-wanted
Dominant language
Python
Stars
553
Forks
177
PR merge metrics
No merged PRs in 30d

Description

Add type hints to all (public API) code make the distribution PEP 561 compliant. This allows mypy (and other tools?) to find the type hints and use them in linting.

In practice, add py.typed file to statsd package, and include it in the package:

setup(
    package_data={'statsd': ['py.typed']},
    zip_safe=False,  # not needed with wheels, AFAIK
)

PEP 561: https://www.python.org/dev/peps/pep-0561/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the statsd package and its setup configuration, then read PEP 561 to confirm the packaging requirements. Add type hints to the public API and include a py.typed file in the distribution; done means type-checking tools can discover the package hints.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.