Clean up unused imports for the peg generator module (GH-19891)

This commit is contained in:
Anthony Shaw 2020-05-04 12:03:05 +10:00 committed by GitHub
parent 7f06af684a
commit c95e691c90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 4 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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 (

View File

@ -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

View File

@ -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

View File

@ -1,8 +1,6 @@
import ast
import sys
import time
import token
import tokenize
from pegen.testutil import print_memstats

View File

@ -4,7 +4,6 @@ import argparse
import ast
import sys
import os
import resource
from time import time
import memory_profiler

View File

@ -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

View File

@ -4,7 +4,6 @@ import argparse
import ast
import os
import sys
import tempfile
import time
import traceback
from glob import glob