mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Clean up unused imports for the peg generator module (GH-19891)
This commit is contained in:
parent
7f06af684a
commit
c95e691c90
9 changed files with 4 additions and 17 deletions
|
|
@ -1,12 +1,11 @@
|
||||||
import pathlib
|
import pathlib
|
||||||
import shutil
|
import shutil
|
||||||
import tokenize
|
import tokenize
|
||||||
import sys
|
|
||||||
import sysconfig
|
import sysconfig
|
||||||
import tempfile
|
import tempfile
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
from typing import Optional, Tuple, List, IO, Iterator, Set, Dict
|
from typing import Optional, Tuple, List, IO, Set, Dict
|
||||||
|
|
||||||
from pegen.c_generator import CParserGenerator
|
from pegen.c_generator import CParserGenerator
|
||||||
from pegen.grammar import Grammar
|
from pegen.grammar import Grammar
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import ast
|
import ast
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
import re
|
import re
|
||||||
from typing import IO, Any, Dict, List, Optional, Set, Text, Tuple
|
from typing import Any, Dict, IO, Optional, List, Text, Tuple, Set
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
from pegen import grammar
|
from pegen import grammar
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
#!/usr/bin/env python3.8
|
#!/usr/bin/env python3.8
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import collections
|
|
||||||
import pprint
|
import pprint
|
||||||
import sys
|
import sys
|
||||||
from typing import Optional, Set, Dict
|
from typing import Set, Dict
|
||||||
|
|
||||||
from pegen.build import build_parser
|
from pegen.build import build_parser
|
||||||
from pegen.grammar import (
|
from pegen.grammar import (
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ from abc import abstractmethod
|
||||||
from typing import (
|
from typing import (
|
||||||
AbstractSet,
|
AbstractSet,
|
||||||
Any,
|
Any,
|
||||||
Callable,
|
|
||||||
Dict,
|
Dict,
|
||||||
Iterable,
|
Iterable,
|
||||||
Iterator,
|
Iterator,
|
||||||
|
|
@ -13,11 +12,9 @@ from typing import (
|
||||||
Set,
|
Set,
|
||||||
Tuple,
|
Tuple,
|
||||||
TYPE_CHECKING,
|
TYPE_CHECKING,
|
||||||
TypeVar,
|
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
|
|
||||||
from pegen.parser import memoize, Parser
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from pegen.parser_generator import ParserGenerator
|
from pegen.parser_generator import ParserGenerator
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from typing import Any, Iterator, Iterable, Callable
|
from typing import Any, Iterator, Callable
|
||||||
|
|
||||||
from pegen.build import build_parser
|
from pegen.build import build_parser
|
||||||
from pegen.grammar import Grammar, Rule
|
from pegen.grammar import Grammar, Rule
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import ast
|
import ast
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import token
|
|
||||||
import tokenize
|
|
||||||
|
|
||||||
from pegen.testutil import print_memstats
|
from pegen.testutil import print_memstats
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import argparse
|
||||||
import ast
|
import ast
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import resource
|
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
import memory_profiler
|
import memory_profiler
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,7 @@ INITIAL_NESTING_DEPTH, or NESTED_INCR_AMT variables.
|
||||||
|
|
||||||
Usage: python -m scripts.find_max_nesting
|
Usage: python -m scripts.find_max_nesting
|
||||||
"""
|
"""
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
from tempfile import TemporaryDirectory
|
|
||||||
from pathlib import Path
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from _peg_parser import parse_string
|
from _peg_parser import parse_string
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import argparse
|
||||||
import ast
|
import ast
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
from glob import glob
|
from glob import glob
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue