Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type annotations to all public methods in support.bits #479

Merged
merged 3 commits into from
Oct 28, 2023

Conversation

whitequark
Copy link
Member

@whitequark whitequark commented Oct 28, 2023

Is this a policy change? Yes: I'm looking to gradually add typing annotations (specifically the Pylance dialect) to Glasgow, and then eventually to Amaranth.

@whitequark
Copy link
Member Author

... Oh, we can't do this until the lowest Python version we support is 3.11.

@whitequark whitequark changed the title Add type annotations to all public methods in support.bits [py3.11+] Add type annotations to all public methods in support.bits Oct 28, 2023
@whitequark
Copy link
Member Author

Or start depending on https://pypi.org/project/typing-extensions/.

@wanda-phi
Copy link
Member

The bits annotations look OK; I can't say I like Python type annotations much (they are a gross hack tbh), but I guess it's better than nothing.

The specific command

    pdm lock -L pdm.min.lock -S direct_minimal_versions

needs to be run anytime dependencies are added or their versions are
changed, and it is not well known; add a shortcut for running it.
@whitequark whitequark changed the title [py3.11+] Add type annotations to all public methods in support.bits Add type annotations to all public methods in support.bits Oct 28, 2023
@whitequark whitequark added this pull request to the merge queue Oct 28, 2023
Merged via the queue into GlasgowEmbedded:main with commit 5a9b10f Oct 28, 2023
18 of 20 checks passed
@whitequark whitequark deleted the bits-annot branch October 28, 2023 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants