Clean up unused imports for the peg generator module (GH-19891)
This commit is contained in:
parent
7f06af684a
commit
c95e691c90
|
@ -1,12 +1,11 @@
|
|||
import pathlib
|
||||
import shutil
|
||||
import tokenize
|
||||
import sys
|
||||
import sysconfig
|
||||
import tempfile
|
||||
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.grammar import Grammar
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import ast
|
||||
from dataclasses import dataclass, field
|
||||
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 pegen import grammar
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#!/usr/bin/env python3.8
|
||||
|
||||
import argparse
|
||||
import collections
|
||||
import pprint
|
||||
import sys
|
||||
from typing import Optional, Set, Dict
|
||||
from typing import Set, Dict
|
||||
|
||||
from pegen.build import build_parser
|
||||
from pegen.grammar import (
|
||||
|
|
|
@ -4,7 +4,6 @@ from abc import abstractmethod
|
|||
from typing import (
|
||||
AbstractSet,
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
Iterable,
|
||||
Iterator,
|
||||
|
@ -13,11 +12,9 @@ from typing import (
|
|||
Set,
|
||||
Tuple,
|
||||
TYPE_CHECKING,
|
||||
TypeVar,
|
||||
Union,
|
||||
)
|
||||
|
||||
from pegen.parser import memoize, Parser
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from pegen.parser_generator import ParserGenerator
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import argparse
|
||||
import sys
|
||||
|
||||
from typing import Any, Iterator, Iterable, Callable
|
||||
from typing import Any, Iterator, Callable
|
||||
|
||||
from pegen.build import build_parser
|
||||
from pegen.grammar import Grammar, Rule
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import ast
|
||||
import sys
|
||||
import time
|
||||
import token
|
||||
import tokenize
|
||||
|
||||
from pegen.testutil import print_memstats
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import argparse
|
|||
import ast
|
||||
import sys
|
||||
import os
|
||||
import resource
|
||||
from time import time
|
||||
|
||||
import memory_profiler
|
||||
|
|
|
@ -13,11 +13,7 @@ INITIAL_NESTING_DEPTH, or NESTED_INCR_AMT variables.
|
|||
|
||||
Usage: python -m scripts.find_max_nesting
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
from tempfile import TemporaryDirectory
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from _peg_parser import parse_string
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import argparse
|
|||
import ast
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
import traceback
|
||||
from glob import glob
|
||||
|
|
Loading…
Reference in New Issue