Various fixes after running pylint
(#71)
This commit is contained in:
parent
0280e8d7e1
commit
1f5ba1b3ca
@ -1,7 +1,6 @@
|
||||
import argparse
|
||||
import dataclasses
|
||||
import inspect
|
||||
import re
|
||||
import subprocess
|
||||
import typing
|
||||
|
||||
@ -72,7 +71,7 @@ def gentest(
|
||||
data = parse_string(content, options=options)
|
||||
if fail:
|
||||
raise ValueError("did not fail")
|
||||
except CxxParseError as e:
|
||||
except CxxParseError:
|
||||
if not fail:
|
||||
raise
|
||||
# do it again, but strip the content so the error message matches
|
||||
|
@ -1,5 +1,3 @@
|
||||
import contextlib
|
||||
from collections import deque
|
||||
import re
|
||||
import typing
|
||||
import sys
|
||||
@ -838,8 +836,6 @@ class BoundedTokenStream(TokenStream):
|
||||
return len(self.tokbuf) > 0
|
||||
|
||||
def _fill_tokbuf(self, tokbuf: typing.Deque[LexToken]) -> bool:
|
||||
from .errors import CxxParseError
|
||||
|
||||
raise CxxParseError("no more tokens left in this group")
|
||||
|
||||
def current_location(self) -> Location:
|
||||
|
@ -94,7 +94,7 @@ class CxxParser:
|
||||
)
|
||||
self.anon_id = 0
|
||||
|
||||
self.verbose = True if self.options.verbose else False
|
||||
self.verbose = self.options.verbose
|
||||
if self.verbose:
|
||||
|
||||
def debug_print(fmt: str, *args: typing.Any) -> None:
|
||||
|
@ -5,7 +5,6 @@ Contains optional preprocessor support via pcpp
|
||||
import io
|
||||
import re
|
||||
import os
|
||||
from os.path import relpath
|
||||
import typing
|
||||
from .options import PreprocessorFunction
|
||||
|
||||
|
@ -50,7 +50,6 @@ from .types import (
|
||||
)
|
||||
|
||||
from .parserstate import (
|
||||
State,
|
||||
ClassBlockState,
|
||||
ExternBlockState,
|
||||
NamespaceBlockState,
|
||||
|
Loading…
x
Reference in New Issue
Block a user