Skip to content

Commit

Permalink
run pre-commit run --all-files
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed May 24, 2023
1 parent da7fb57 commit 560fd82
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions flexparser/flexparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,9 @@ def __iter__(
yield el
yield self.closing

def iter_blocks(self) -> ty.Generator[ParsedResult[Union[OPST, BPST, CPST]], None, None]:
def iter_blocks(
self,
) -> ty.Generator[ParsedResult[Union[OPST, BPST, CPST]], None, None]:
raise RuntimeError("Is this used?")
yield self.opening
yield from self.body
Expand Down Expand Up @@ -1432,14 +1434,17 @@ class CustomParser(Parser[spec, spec.specialization()[CT]]): # type: ignore

@no_type_check
def build_parser_class(
spec: Union[type[
Union[
Parser[RBT, CT],
RootBlock[BPST, CT],
Block[OPST, BPST, CPST, CT],
ParsedStatement[CT],
]
], ty.Iterable[type[ParsedStatement[CT]]]],
spec: Union[
type[
Union[
Parser[RBT, CT],
RootBlock[BPST, CT],
Block[OPST, BPST, CPST, CT],
ParsedStatement[CT],
]
],
ty.Iterable[type[ParsedStatement[CT]]],
],
config: CT = None,
strip_spaces: bool = True,
delimiters: Optional[DelimiterDictT] = None,
Expand Down Expand Up @@ -1519,15 +1524,17 @@ def build_parser_class(
@no_type_check
def parse(
entry_point: SourceLocationT,
spec: Union[type[
Union[
Parser[RBT, CT],
RootBlock[BPST, CT],
Block[OPST, BPST, CPST, CT],
ParsedStatement[CT],
]
spec: Union[
type[
Union[
Parser[RBT, CT],
RootBlock[BPST, CT],
Block[OPST, BPST, CPST, CT],
ParsedStatement[CT],
]
],
ty.Iterable[type[ParsedStatement[CT]]],
],
ty.Iterable[type[ParsedStatement[CT]]]],
config: CT = None,
*,
strip_spaces: bool = True,
Expand Down

0 comments on commit 560fd82

Please sign in to comment.