QuantEcon / QuantEcon/QuantEcon.py

DISCUSS: Agree a type-hint policy

Open
#897 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discuss low-priority
Dominant language
Python
Stars
2.4k
Forks
2.3k
Avg merge
3d 3h
Merged PRs (30d)
3

Description

The decision needed

Type annotations cover 9 of 481 functions (1.9%), all in three recently added game_theory modules (game_converters.py, howson_lcp.py, polymatrix_game.py). New code annotates; old code does not; nothing records which is intended.

The decision has been pending in concrete form for a long time: PR #576 ("Annotate normal_form_game.py") has been open more than five years. Resolving the policy resolves the PR, one way or the other.

Questions for the team
  1. Are annotations expected on new code, welcome but optional, or out of scope?
  2. If expected, is the target the public API surface only, or everything?
  3. Numba-jitted functions have real constraints — annotations on @njit functions are informational and can mislead about what numba actually accepts. Does the policy carve them out?
  4. Is a py.typed marker and a checked mypy job on the roadmap, or would annotations be documentation-only?
  5. Does PR #576 merge, get rebased, or get closed?

Whatever is decided, write it in the contributing guide. The current state is not a wrong decision; it is an unmade one, and the cost falls on contributors who cannot tell whether adding hints will be welcomed or reverted. Close this thread with a summarised decision and spawn concrete follow-ups.


From the July 2026 technical-debt audit (AI-assisted; claims verified against 28d4b3b on 2026-07-25).

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 contributing guide, the annotated modules game_converters.py, howson_lcp.py, and polymatrix_game.py, and PR #576. This issue needs a team decision on annotation policy and the PR's disposition; done means the decision is summarized in the contributing guide and concrete follow-ups are identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.