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
Traceback (most recent call last): File "/Users/v832272/.asdf/installs/python/3.11.0/bin/pyupgrade", line 8, in <module> sys.exit(main()) ^^^^^^ File "/Users/v832272/.asdf/installs/python/3.11.0/lib/python3.11/site-packages/pyupgrade/_main.py", line 381, in main ret |= _fix_file(filename, args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/v832272/.asdf/installs/python/3.11.0/lib/python3.11/site-packages/pyupgrade/_main.py", line 318, in _fix_file contents_text = _fix_plugins( ^^^^^^^^^^^^^ File "/Users/v832272/.asdf/installs/python/3.11.0/lib/python3.11/site-packages/pyupgrade/_main.py", line 80, in _fix_plugins callback(i, tokens) File "/Users/v832272/.asdf/installs/python/3.11.0/lib/python3.11/site-packages/pyupgrade/_plugins/typing_classes.py", line 141, in _fix_dict_typed_dict end, attrs = _typed_class_replacement(tokens, i, call, types) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/v832272/.asdf/installs/python/3.11.0/lib/python3.11/site-packages/pyupgrade/_plugins/typing_classes.py", line 82, in _typed_class_replacement member = f'{indent}{k}: {_unparse(v)}' ^^^^^^^^^^^ File "/Users/v832272/.asdf/installs/python/3.11.0/lib/python3.11/site-packages/pyupgrade/_plugins/typing_classes.py", line 50, in _unparse raise NotImplementedError(ast.dump(node)) NotImplementedError: BinOp(left=Name(id='ExampleChangeRequestResponseOutageDict', ctx=Load()), op=BitOr(), right=Constant(value=None))
This is triggered by:
ExampleChangeRequestResponseOutageDict = TypedDict( "ExampleChangeRequestResponseOutageDict", {"outage-seq-id": int, "outage-start-time": str, "outage-end-time": str}, ) ExampleChangeRequestResponseOutageListDict = TypedDict( "ExampleChangeRequestResponseOutageListDict", {"outages": ExampleChangeRequestResponseOutageDict | None}, )
Command used:
find src -name '*.py' -type f | xargs -n 1 -I {} pyupgrade --py311-plus {}
The text was updated successfully, but these errors were encountered:
ah yes, the binary or syntax came way after this rewrite -- should be an easy patch though
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
This is triggered by:
Command used:
The text was updated successfully, but these errors were encountered: