pyodide / pyodide/webtypy

Consider splitting __init__.pyi into several files

Open
#6 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
23
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Right now __init__.pyi is 14k lines of code which is massive, and doesn't even load in GitHub properly for me.

If possible it could be good to split it into submodules (all of which are imported from __init__.pyi). PEP 561 doesn't say anything about it, but in practice for instance the typeshed package does this so it probably works fine. Though there might be something about using from a import b as b for it to work.

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

Start by reading init.pyi and compare its structure with the linked typeshed braintree stub. Verify how splitting the 14k-line stub into submodules would preserve the public imports and PEP 561 behavior. Done means the definitions are split into maintainable files while existing type imports continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
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.