Skip to content

Commit

Permalink
Merge pull request #893 from asottile/os-error-is-an-alias
Browse files Browse the repository at this point in the history
also rewrite os.error -> OSError
  • Loading branch information
asottile committed Sep 21, 2023
2 parents b0e58ec + 10319a8 commit 8fa06f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyupgrade/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class State(NamedTuple):
'__future__',
'functools',
'mmap',
'os',
'select',
'six',
'six.moves',
Expand Down
2 changes: 1 addition & 1 deletion pyupgrade/_plugins/oserror_aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from pyupgrade._token_helpers import replace_name

ERROR_NAMES = frozenset(('EnvironmentError', 'IOError', 'WindowsError'))
ERROR_MODULES = frozenset(('mmap', 'select', 'socket'))
ERROR_MODULES = frozenset(('mmap', 'select', 'socket', 'os'))


def _fix_oserror_except(
Expand Down

0 comments on commit 8fa06f4

Please sign in to comment.