We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
os-error-alias
os.error
os.error is an alias for OSError, but is not standardized as part of https://docs.astral.sh/ruff/rules/os-error-alias/
OSError
>>> import os; OSError is os.error True
import os try: pass except (WindowsError, os.error): pass
becomes:
import os try: pass except (OSError, os.error): pass
expected:
import os # This import is now unused and can be removed try: pass except OSError: pass
This would be a deviation from pyupgrade, I have opened the same request in parallel: asottile/pyupgrade#892 Edit: This was just added in asottile/pyupgrade#893
The text was updated successfully, but these errors were encountered:
os-error-aliases
Treat os.error as an OSError alias (#7582)
a51b0b0
Closes #7580.
charliermarsh
Successfully merging a pull request may close this issue.
os.error
is an alias forOSError
, but is not standardized as part of https://docs.astral.sh/ruff/rules/os-error-alias/becomes:
expected:
This would be a deviation from pyupgrade, I have opened the same request in parallel: asottile/pyupgrade#892Edit: This was just added in asottile/pyupgrade#893
The text was updated successfully, but these errors were encountered: