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

Incorrect type annotations on TransifexAPI members #119

Open
JelleZijlstra opened this issue Oct 30, 2024 · 0 comments · May be fixed by #120
Open

Incorrect type annotations on TransifexAPI members #119

JelleZijlstra opened this issue Oct 30, 2024 · 0 comments · May be fixed by #120

Comments

@JelleZijlstra
Copy link

The transifex.api.TransifexApi contains a number of lines of the form Team: JsonApiResource (

# Auto-completion support
). A comment says this is for autocompletion support.

However, these type annotations are incorrect as the class has attributes that contain types (subclasses of JsonAPiResource), not instances. This leads type checkers to show incorrect errors when these attributes are used.

To fix, the code should have lines of the form type[JsonApiResource] instead, indicating that the attributes contain types, not instances.

JelleZijlstra added a commit to JelleZijlstra/transifex-python that referenced this issue Oct 30, 2024
These attributes holds types, not instances. Fixes transifex#119.
@JelleZijlstra JelleZijlstra linked a pull request Oct 30, 2024 that will close this issue
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 a pull request may close this issue.

1 participant