-
-
Notifications
You must be signed in to change notification settings - Fork 181
typing fixes #334
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
typing fixes #334
Conversation
| except ImportError: | ||
|
|
||
| def fspath(path): | ||
| def fspath(path): # type: ignore |
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.
mypy complains about redefinition
| # type: () -> None | ||
| self.root = None | ||
| if not self._closed: | ||
| del self.root |
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.
Mypy complains when assigning None, rather than modify the type of root just del it.
| return os.readlink(sys_path) | ||
| else: | ||
| target = os.readlink(fsencode(sys_path)) | ||
| return fsdecode(os.readlink(fsencode(sys_path))) |
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.
The link target was returned as bytes. A genuine bug uncovered by Mypy. Thanks, Mypy.
Type of changes
Checklist
Description
Fixing typing related issues