python / python/pyperformance

Add type hints?

Open
#282 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
203
Avg merge
1h 20m
Merged PRs (30d)
2

Description

How would we feel about adding type hints to the pyperformance codebase?

Running a type checker on pyperformance might catch some bugs. But more importantly, in my opinion, it would make some parts of the code base a lot easier to read and reason about -- it would be self-evident what kind of object is being accepted and returned by various functions.

There are various tools that we could use to add "obvious" type hints quickly to the code base, such as autotyping and MonkeyType.

Contributor guide

No contributing guide indexed for this repository

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

No files or tests are named. Start by reviewing the pyperformance codebase and evaluating autotyping and MonkeyType as possible starting points. Done would require an agreed scope for adding type hints and a type-checking approach that improves readability and can catch bugs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.