Names defined in `__init__.pyi` are not the same as names that can be imported from `js`
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 23
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
In __init__.py we see stuff like:
class WindowOrWorkerGlobalScope:
indexedDB: IDBFactory
...
So this typechecks but raises an ImportError at runtime:
from js import WindowOrWorkerGlobalScope
And this is a type error but works at runtime:
from js import indexedDB
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the names exposed by init.pyi with those available at runtime from init.py, using the two import examples in the issue as starting points. Done means names that type-check can be imported from js, while names available at runtime are represented consistently in the type definitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100