From 226decb89f4cb5870efb17090fb1536fbda17441 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Fri, 11 Oct 2024 18:03:20 -0400 Subject: [PATCH] regenerate symbols for --py313-plus --- pyupgrade/_main.py | 4 ++++ pyupgrade/_plugins/imports.py | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/pyupgrade/_main.py b/pyupgrade/_main.py index c8342031..4ac91810 100644 --- a/pyupgrade/_main.py +++ b/pyupgrade/_main.py @@ -378,6 +378,10 @@ def main(argv: Sequence[str] | None = None) -> int: '--py312-plus', action='store_const', dest='min_version', const=(3, 12), ) + parser.add_argument( + '--py313-plus', + action='store_const', dest='min_version', const=(3, 13), + ) args = parser.parse_args(argv) ret = 0 diff --git a/pyupgrade/_plugins/imports.py b/pyupgrade/_plugins/imports.py index 9574da04..dbd44e77 100644 --- a/pyupgrade/_plugins/imports.py +++ b/pyupgrade/_plugins/imports.py @@ -21,7 +21,7 @@ from pyupgrade._token_helpers import indented_amount # GENERATED VIA generate-imports -# Using reorder-python-imports==3.13.0 +# Using reorder-python-imports==3.14.0 REMOVALS = { (3,): { '__future__': { @@ -223,6 +223,23 @@ ('typing_extensions', 'dataclass_transform'): 'typing', ('typing_extensions', 'override'): 'typing', }, + (3, 13): { + ('typing_extensions', 'AsyncContextManager'): 'typing', + ('typing_extensions', 'AsyncGenerator'): 'typing', + ('typing_extensions', 'ContextManager'): 'typing', + ('typing_extensions', 'Generator'): 'typing', + ('typing_extensions', 'NoDefault'): 'typing', + ('typing_extensions', 'ParamSpec'): 'typing', + ('typing_extensions', 'Protocol'): 'typing', + ('typing_extensions', 'ReadOnly'): 'typing', + ('typing_extensions', 'TypeIs'): 'typing', + ('typing_extensions', 'TypeVar'): 'typing', + ('typing_extensions', 'TypeVarTuple'): 'typing', + ('typing_extensions', 'TypedDict'): 'typing', + ('typing_extensions', 'get_protocol_members'): 'typing', + ('typing_extensions', 'is_protocol'): 'typing', + ('typing_extensions', 'runtime_checkable'): 'typing', + }, } REPLACE_MODS = { 'six.moves.BaseHTTPServer': 'http.server',