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 hints to abstractmethods of Path #646

Merged

Conversation

moskupols
Copy link
Contributor

We are currently integrating pyright checks in our project. We found that generally pyright is great at inferring the return types by just looking at the source code of libraries. However for abstractmethods which only contain a docstring it assumes that the method is supposed to return None since there's no return statement.
This minimal set of hints seems to help pyright figure out how plumbum paths work.

@coveralls
Copy link

coveralls commented May 13, 2023

Coverage Status

Coverage: 83.946%. Remained the same when pulling 45620b5 on moskupols:type-hint-return-path-abstractmethods into c03482b on tomerfiliba:master.

@moskupols moskupols changed the title Add return type hints for abstractmethods of Path Add type hints to abstractmethods of Path May 13, 2023
@henryiii henryiii merged commit c2c2275 into tomerfiliba:master May 30, 2023
@henryiii
Copy link
Collaborator

Thanks! Eventually I'd like to get more typing in. :)

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.

4 participants