mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	gh-120417: Remove unused imports in cases_generator (#120622)
This commit is contained in:
		
							parent
							
								
									2c66318cdc
								
							
						
					
					
						commit
						35b16795d1
					
				
					 11 changed files with 7 additions and 30 deletions
				
			
		| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
from dataclasses import dataclass, field
 | 
					from dataclasses import dataclass
 | 
				
			||||||
import lexer
 | 
					import lexer
 | 
				
			||||||
import parser
 | 
					import parser
 | 
				
			||||||
import re
 | 
					import re
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,14 +4,12 @@
 | 
				
			||||||
from analyzer import (
 | 
					from analyzer import (
 | 
				
			||||||
    Instruction,
 | 
					    Instruction,
 | 
				
			||||||
    Uop,
 | 
					    Uop,
 | 
				
			||||||
    analyze_files,
 | 
					 | 
				
			||||||
    Properties,
 | 
					    Properties,
 | 
				
			||||||
    Skip,
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from cwriter import CWriter
 | 
					from cwriter import CWriter
 | 
				
			||||||
from typing import Callable, Mapping, TextIO, Iterator
 | 
					from typing import Callable, Mapping, TextIO, Iterator
 | 
				
			||||||
from lexer import Token
 | 
					from lexer import Token
 | 
				
			||||||
from stack import StackOffset, Stack
 | 
					from stack import Stack
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ROOT = Path(__file__).parent.parent.parent
 | 
					ROOT = Path(__file__).parent.parent.parent
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,12 +4,9 @@
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import argparse
 | 
					import argparse
 | 
				
			||||||
import os.path
 | 
					 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
from analyzer import (
 | 
					from analyzer import (
 | 
				
			||||||
    Analysis,
 | 
					    Analysis,
 | 
				
			||||||
    Instruction,
 | 
					 | 
				
			||||||
    analyze_files,
 | 
					    analyze_files,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from generators_common import (
 | 
					from generators_common import (
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,15 +4,12 @@
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import argparse
 | 
					import argparse
 | 
				
			||||||
import os.path
 | 
					 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
from analyzer import (
 | 
					from analyzer import (
 | 
				
			||||||
    Analysis,
 | 
					    Analysis,
 | 
				
			||||||
    Instruction,
 | 
					    Instruction,
 | 
				
			||||||
    PseudoInstruction,
 | 
					    PseudoInstruction,
 | 
				
			||||||
    analyze_files,
 | 
					    analyze_files,
 | 
				
			||||||
    Skip,
 | 
					 | 
				
			||||||
    Uop,
 | 
					    Uop,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from generators_common import (
 | 
					from generators_common import (
 | 
				
			||||||
| 
						 | 
					@ -20,7 +17,6 @@
 | 
				
			||||||
    ROOT,
 | 
					    ROOT,
 | 
				
			||||||
    write_header,
 | 
					    write_header,
 | 
				
			||||||
    cflags,
 | 
					    cflags,
 | 
				
			||||||
    StackOffset,
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from cwriter import CWriter
 | 
					from cwriter import CWriter
 | 
				
			||||||
from typing import TextIO
 | 
					from typing import TextIO
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,13 +18,12 @@
 | 
				
			||||||
    ROOT,
 | 
					    ROOT,
 | 
				
			||||||
    write_header,
 | 
					    write_header,
 | 
				
			||||||
    emit_tokens,
 | 
					    emit_tokens,
 | 
				
			||||||
    emit_to,
 | 
					 | 
				
			||||||
    replace_sync_sp,
 | 
					    replace_sync_sp,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from cwriter import CWriter
 | 
					from cwriter import CWriter
 | 
				
			||||||
from typing import TextIO, Iterator
 | 
					from typing import TextIO, Iterator
 | 
				
			||||||
from lexer import Token
 | 
					from lexer import Token
 | 
				
			||||||
from stack import Stack, SizeMismatch, UNUSED
 | 
					from stack import Stack, SizeMismatch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEFAULT_OUTPUT = ROOT / "Python/optimizer_cases.c.h"
 | 
					DEFAULT_OUTPUT = ROOT / "Python/optimizer_cases.c.h"
 | 
				
			||||||
DEFAULT_ABSTRACT_INPUT = (ROOT / "Python/optimizer_bytecodes.c").absolute().as_posix()
 | 
					DEFAULT_ABSTRACT_INPUT = (ROOT / "Python/optimizer_bytecodes.c").absolute().as_posix()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
from parsing import (
 | 
					from parsing import (  # noqa: F401
 | 
				
			||||||
    InstDef,
 | 
					    InstDef,
 | 
				
			||||||
    Macro,
 | 
					    Macro,
 | 
				
			||||||
    Pseudo,
 | 
					    Pseudo,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,7 +12,6 @@
 | 
				
			||||||
from generators_common import (
 | 
					from generators_common import (
 | 
				
			||||||
    DEFAULT_INPUT,
 | 
					    DEFAULT_INPUT,
 | 
				
			||||||
    ROOT,
 | 
					    ROOT,
 | 
				
			||||||
    root_relative_path,
 | 
					 | 
				
			||||||
    write_header,
 | 
					    write_header,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from cwriter import CWriter
 | 
					from cwriter import CWriter
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,7 +14,6 @@
 | 
				
			||||||
    ROOT,
 | 
					    ROOT,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from cwriter import CWriter
 | 
					from cwriter import CWriter
 | 
				
			||||||
from typing import TextIO
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEFAULT_OUTPUT = ROOT / "Python/opcode_targets.h"
 | 
					DEFAULT_OUTPUT = ROOT / "Python/opcode_targets.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,8 +4,6 @@
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import argparse
 | 
					import argparse
 | 
				
			||||||
import os.path
 | 
					 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
from analyzer import (
 | 
					from analyzer import (
 | 
				
			||||||
    Analysis,
 | 
					    Analysis,
 | 
				
			||||||
| 
						 | 
					@ -14,7 +12,6 @@
 | 
				
			||||||
    Part,
 | 
					    Part,
 | 
				
			||||||
    analyze_files,
 | 
					    analyze_files,
 | 
				
			||||||
    Skip,
 | 
					    Skip,
 | 
				
			||||||
    StackItem,
 | 
					 | 
				
			||||||
    analysis_error,
 | 
					    analysis_error,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from generators_common import (
 | 
					from generators_common import (
 | 
				
			||||||
| 
						 | 
					@ -24,9 +21,8 @@
 | 
				
			||||||
    emit_tokens,
 | 
					    emit_tokens,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from cwriter import CWriter
 | 
					from cwriter import CWriter
 | 
				
			||||||
from typing import TextIO, Iterator
 | 
					from typing import TextIO
 | 
				
			||||||
from lexer import Token
 | 
					from stack import Stack, SizeMismatch
 | 
				
			||||||
from stack import StackOffset, Stack, SizeMismatch
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEFAULT_OUTPUT = ROOT / "Python/generated_cases.c.h"
 | 
					DEFAULT_OUTPUT = ROOT / "Python/generated_cases.c.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,16 +4,12 @@
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import argparse
 | 
					import argparse
 | 
				
			||||||
import os.path
 | 
					 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
from analyzer import (
 | 
					from analyzer import (
 | 
				
			||||||
    Analysis,
 | 
					    Analysis,
 | 
				
			||||||
    Instruction,
 | 
					    Instruction,
 | 
				
			||||||
    Uop,
 | 
					    Uop,
 | 
				
			||||||
    Part,
 | 
					 | 
				
			||||||
    analyze_files,
 | 
					    analyze_files,
 | 
				
			||||||
    Skip,
 | 
					 | 
				
			||||||
    StackItem,
 | 
					    StackItem,
 | 
				
			||||||
    analysis_error,
 | 
					    analysis_error,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
| 
						 | 
					@ -28,7 +24,7 @@
 | 
				
			||||||
from cwriter import CWriter
 | 
					from cwriter import CWriter
 | 
				
			||||||
from typing import TextIO, Iterator
 | 
					from typing import TextIO, Iterator
 | 
				
			||||||
from lexer import Token
 | 
					from lexer import Token
 | 
				
			||||||
from stack import StackOffset, Stack, SizeMismatch
 | 
					from stack import Stack, SizeMismatch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEFAULT_OUTPUT = ROOT / "Python/executor_cases.c.h"
 | 
					DEFAULT_OUTPUT = ROOT / "Python/executor_cases.c.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,12 +4,9 @@
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import argparse
 | 
					import argparse
 | 
				
			||||||
import os.path
 | 
					 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
from analyzer import (
 | 
					from analyzer import (
 | 
				
			||||||
    Analysis,
 | 
					    Analysis,
 | 
				
			||||||
    Instruction,
 | 
					 | 
				
			||||||
    analyze_files,
 | 
					    analyze_files,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from generators_common import (
 | 
					from generators_common import (
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue