apache / apache/buildstream

Potentially remove all those pesky .pyi files

Open
#1,412 6 comments 0 reactions 0 assignees View on GitHub
refactoring
Dominant language
Python
Stars
140
Forks
45
Avg merge
1d 3h
Merged PRs (30d)
6

Description

[See original issue on GitLab](https://gitlab.com/BuildStream/buildstream/-/issues/1412)
In GitLab by [[Gitlab user @tristanvb]](https://gitlab.com/tristanvb) on Dec 2, 2020, 10:07

Apparently, it is possible to [encode pep484 type information directly into cython modules](https://cython.readthedocs.io/en/latest/src/tutorial/pure.html#pep-484-type-annotations)

It could be nice to remove all the redundant forward declarations...

Needs investigation, possibly we need to use [a mypyc extension](https://github.com/python/mypy/tree/master/mypyc#mypyc-mypy-to-python-c-extension-compiler) for validation in CI.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the referenced Cython PEP 484 documentation and locating the existing .pyi files and their CI validation. Determine whether type information can be moved into the Cython modules and whether mypyc is needed for validation. Done means redundant forward declarations are removed without losing type-checking coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
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.