-
-
Notifications
You must be signed in to change notification settings - Fork 163
Add type stubs from typeshed #222
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
base: main
Are you sure you want to change the base?
Conversation
MarcoGorelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, just left a comment
|
@Tinche This is almost ready for a final review. There is just one outstanding error that is arising from the type-checker that I am not certain about and would appreciate your guidance on. In text.py,
|
|
Oops, I just saw #28! In which case, this PR is ready for review now. |
| follow_symlinks: bool = True, | ||
| loop: AbstractEventLoop | None = ..., | ||
| executor: Executor | None = ..., | ||
| ) -> stat_result: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you possibly separate these "typedefs" with a newline for readability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it turns out that the typing style guide recommends to not use blank lines between methods except to group them: https://typing.python.org/en/latest/guides/writing_stubs.html#blank-lines.
I spent a small amount of time trying to override this in ruff but was not successful.
Do you mind very much keeping it the way it is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it turns out that the typing style guide recommends to not use blank lines between methods except to group them: https://typing.python.org/en/latest/guides/writing_stubs.html#blank-lines.
I spent a small amount of time trying to override this in
ruffbut was not successful.Do you mind very much keeping it the way it is?
I don't mind, thanks for the reference.
|
|
||
| test: | ||
| {{ run_prefix }}pytest -x --ff {{ tests_dir }} | ||
| {{ run_prefix }}pytest -x --ff {{ tests_dir }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, but optional, you can move these pytest options into the pyproject.toml done like here in case you PR goes first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And add the RUF set of rules - https://github.com/Tinche/aiofiles/pull/213/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R141 - just in case and if you like.
(WIP, DO NOT MERGE - still waiting for internal review)Ready for review.
Closes #49