mirror of https://github.com/python/cpython
gh-120417: Remove unused imports in cases_generator (#120622)
This commit is contained in:
parent
2c66318cdc
commit
35b16795d1
|
@ -1,4 +1,4 @@
|
|||
from dataclasses import dataclass, field
|
||||
from dataclasses import dataclass
|
||||
import lexer
|
||||
import parser
|
||||
import re
|
||||
|
|
|
@ -4,14 +4,12 @@ from typing import TextIO
|
|||
from analyzer import (
|
||||
Instruction,
|
||||
Uop,
|
||||
analyze_files,
|
||||
Properties,
|
||||
Skip,
|
||||
)
|
||||
from cwriter import CWriter
|
||||
from typing import Callable, Mapping, TextIO, Iterator
|
||||
from lexer import Token
|
||||
from stack import StackOffset, Stack
|
||||
from stack import Stack
|
||||
|
||||
|
||||
ROOT = Path(__file__).parent.parent.parent
|
||||
|
|
|
@ -4,12 +4,9 @@ Writes the IDs to opcode_ids.h by default.
|
|||
"""
|
||||
|
||||
import argparse
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
from analyzer import (
|
||||
Analysis,
|
||||
Instruction,
|
||||
analyze_files,
|
||||
)
|
||||
from generators_common import (
|
||||
|
|
|
@ -4,15 +4,12 @@ Writes the metadata to pycore_opcode_metadata.h by default.
|
|||
"""
|
||||
|
||||
import argparse
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
from analyzer import (
|
||||
Analysis,
|
||||
Instruction,
|
||||
PseudoInstruction,
|
||||
analyze_files,
|
||||
Skip,
|
||||
Uop,
|
||||
)
|
||||
from generators_common import (
|
||||
|
@ -20,7 +17,6 @@ from generators_common import (
|
|||
ROOT,
|
||||
write_header,
|
||||
cflags,
|
||||
StackOffset,
|
||||
)
|
||||
from cwriter import CWriter
|
||||
from typing import TextIO
|
||||
|
|
|
@ -18,13 +18,12 @@ from generators_common import (
|
|||
ROOT,
|
||||
write_header,
|
||||
emit_tokens,
|
||||
emit_to,
|
||||
replace_sync_sp,
|
||||
)
|
||||
from cwriter import CWriter
|
||||
from typing import TextIO, Iterator
|
||||
from lexer import Token
|
||||
from stack import Stack, SizeMismatch, UNUSED
|
||||
from stack import Stack, SizeMismatch
|
||||
|
||||
DEFAULT_OUTPUT = ROOT / "Python/optimizer_cases.c.h"
|
||||
DEFAULT_ABSTRACT_INPUT = (ROOT / "Python/optimizer_bytecodes.c").absolute().as_posix()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from parsing import (
|
||||
from parsing import ( # noqa: F401
|
||||
InstDef,
|
||||
Macro,
|
||||
Pseudo,
|
||||
|
|
|
@ -12,7 +12,6 @@ from analyzer import (
|
|||
from generators_common import (
|
||||
DEFAULT_INPUT,
|
||||
ROOT,
|
||||
root_relative_path,
|
||||
write_header,
|
||||
)
|
||||
from cwriter import CWriter
|
||||
|
|
|
@ -14,7 +14,6 @@ from generators_common import (
|
|||
ROOT,
|
||||
)
|
||||
from cwriter import CWriter
|
||||
from typing import TextIO
|
||||
|
||||
|
||||
DEFAULT_OUTPUT = ROOT / "Python/opcode_targets.h"
|
||||
|
|
|
@ -4,8 +4,6 @@ Writes the cases to generated_cases.c.h, which is #included in ceval.c.
|
|||
"""
|
||||
|
||||
import argparse
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
from analyzer import (
|
||||
Analysis,
|
||||
|
@ -14,7 +12,6 @@ from analyzer import (
|
|||
Part,
|
||||
analyze_files,
|
||||
Skip,
|
||||
StackItem,
|
||||
analysis_error,
|
||||
)
|
||||
from generators_common import (
|
||||
|
@ -24,9 +21,8 @@ from generators_common import (
|
|||
emit_tokens,
|
||||
)
|
||||
from cwriter import CWriter
|
||||
from typing import TextIO, Iterator
|
||||
from lexer import Token
|
||||
from stack import StackOffset, Stack, SizeMismatch
|
||||
from typing import TextIO
|
||||
from stack import Stack, SizeMismatch
|
||||
|
||||
|
||||
DEFAULT_OUTPUT = ROOT / "Python/generated_cases.c.h"
|
||||
|
|
|
@ -4,16 +4,12 @@ Writes the cases to executor_cases.c.h, which is #included in ceval.c.
|
|||
"""
|
||||
|
||||
import argparse
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
from analyzer import (
|
||||
Analysis,
|
||||
Instruction,
|
||||
Uop,
|
||||
Part,
|
||||
analyze_files,
|
||||
Skip,
|
||||
StackItem,
|
||||
analysis_error,
|
||||
)
|
||||
|
@ -28,7 +24,7 @@ from generators_common import (
|
|||
from cwriter import CWriter
|
||||
from typing import TextIO, Iterator
|
||||
from lexer import Token
|
||||
from stack import StackOffset, Stack, SizeMismatch
|
||||
from stack import Stack, SizeMismatch
|
||||
|
||||
DEFAULT_OUTPUT = ROOT / "Python/executor_cases.c.h"
|
||||
|
||||
|
|
|
@ -4,12 +4,9 @@ Writes the IDs to pycore_uop_ids.h by default.
|
|||
"""
|
||||
|
||||
import argparse
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
from analyzer import (
|
||||
Analysis,
|
||||
Instruction,
|
||||
analyze_files,
|
||||
)
|
||||
from generators_common import (
|
||||
|
|
Loading…
Reference in New Issue