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