-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TYP: mostly missing return annotations in IO #44801
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,7 +174,7 @@ def _expand_user(filepath_or_buffer: str | BaseBufferT) -> str | BaseBufferT: | |
return filepath_or_buffer | ||
|
||
|
||
def validate_header_arg(header) -> None: | ||
def validate_header_arg(header: object) -> None: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typeshed recommends to use https://github.com/python/typeshed/blob/master/CONTRIBUTING.md#conventions
|
||
if isinstance(header, bool): | ||
raise TypeError( | ||
"Passing a bool to header is invalid. Use header=None for no header or " | ||
|
@@ -662,8 +662,7 @@ def get_handle( | |
mode += "b" | ||
|
||
# validate encoding and errors | ||
if isinstance(encoding, str): | ||
codecs.lookup(encoding) | ||
codecs.lookup(encoding) | ||
if isinstance(errors, str): | ||
codecs.lookup_error(errors) | ||
|
||
|
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.
is
# pragma: no cover
for codecov? Does it need to be on thedef to_clipboard
-line?