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 311035b commit bc25f75
Show file tree
Hide file tree
Showing 12 changed files with 237 additions and 164 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- [ ] Closes # (insert issue number)
- [ ] Executed ``pre-commit run --all-files`` with no errors
- [ ] Executed `pre-commit run --all-files` with no errors
- [ ] The change is fully covered by automated unit tests
- [ ] Added an entry to the CHANGES file
2 changes: 0 additions & 2 deletions examples/pint/parse-pint.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@dataclass(frozen=True)
class ImportDefinition(fp.IncludeStatement):

value: str

@property
Expand All @@ -27,7 +26,6 @@ def from_string(cls, s: str) -> fp.FromString[ImportDefinition]:

@dataclass(frozen=True)
class EntryBlock(fp.RootBlock):

body: fp.Multi[
ty.Union[
common.Comment,
Expand Down
3 changes: 1 addition & 2 deletions examples/pint/pint_parser/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import re
import typing as ty
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable, Dict, Set, Tuple
from typing import TYPE_CHECKING, Any, Callable

from flexparser import flexparser as fp

Expand All @@ -22,7 +22,6 @@ def from_string(cls, s, *args):

@dataclass(frozen=True)
class _Relation:

_varname_re = re.compile(r"[A-Za-z_][A-Za-z0-9_]*")

src: UnitsContainer
Expand Down
2 changes: 0 additions & 2 deletions examples/pint/pint_parser/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@

@dataclass(frozen=True)
class DefinitionSyntaxError(fp.ParsingError):

msg: str
base_exception: ty.Optional[Exception] = None


@dataclass(frozen=True)
class UnexpectedScaleInContainer(fp.ParsingError):

msg: str
2 changes: 1 addition & 1 deletion examples/pint/pint_parser/plain.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import typing as ty
from dataclasses import dataclass
from functools import cached_property
from typing import Callable, Optional
from typing import Callable

from flexparser import flexparser as fp

Expand Down
1 change: 0 additions & 1 deletion examples/pint/pint_parser/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@dataclass(frozen=True)
class Rule(fp.ParsedStatement):

new_unit_name: str
old_unit_name: ty.Optional[str] = None

Expand Down
Loading

0 comments on commit bc25f75

Please sign in to comment.