Skip to content

Commit

Permalink
Merge pull request #352 from asottile/winreg
Browse files Browse the repository at this point in the history
add winreg to six.moves rewrites
  • Loading branch information
asottile committed Sep 15, 2023
2 parents f3cff24 + e04a124 commit 12a7524
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion reorder_python_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def _fix_file(
'six.moves.BaseHTTPServer=http.server',
'six.moves.CGIHTTPServer=http.server',
'six.moves.SimpleHTTPServer=http.server',
'six.moves._dummy_thread=_dummy_thread',
'six.moves._dummy_thread=_thread',
'six.moves._thread=_thread',
'six.moves.builtins=builtins',
'six.moves.cPickle=pickle',
Expand Down Expand Up @@ -609,6 +609,7 @@ def _fix_file(
'six.moves.urllib_error=urllib.error',
'six.moves.urllib_parse=urllib.parse',
'six.moves.urllib_robotparser=urllib.robotparser',
'six.moves.winreg=_winreg',
'six.moves.xmlrpc_client=xmlrpc.client',
'six.moves.xmlrpc_server=xmlrpc.server',
'six.moves=collections:UserDict',
Expand Down
3 changes: 3 additions & 0 deletions testing/generate-six-info
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def main() -> int:
for submod in ('error', 'parse', 'request', 'response', 'robotparser')
]

# six only exports this on windows
renames.append('six.moves.winreg=_winreg')

# not in six.moves for some reason
renames.extend((
'six=functools:wraps',
Expand Down

0 comments on commit 12a7524

Please sign in to comment.