Skip to content

Commit

Permalink
Update to Ruff 0.8 (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
drhagen authored Nov 26, 2024
1 parent 82ccbbc commit 820da4b
Show file tree
Hide file tree
Showing 11 changed files with 344 additions and 338 deletions.
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ def type_check(s: Session):

@session(venv_backend="none")
def format(s: Session):
s.run("ruff", "check", ".", "--select", "I", "--fix")
s.run("ruff", "check", ".", "--select", "I", "--select", "RUF022", "--fix")
s.run("ruff", "format", ".")
662 changes: 334 additions & 328 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pytest-cov = "*"
pytest-timeout = "*"

# Lint
ruff = "^0.6"
ruff = "^0.8"

# Type checking
mypy = "^1"
Expand Down
2 changes: 1 addition & 1 deletion src/parsita/metaclasses.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

__all__ = ["ForwardDeclaration", "fwd", "ParserContext"]
__all__ = ["ForwardDeclaration", "ParserContext", "fwd"]

import builtins
import inspect
Expand Down
2 changes: 1 addition & 1 deletion src/parsita/parsers/_alternative.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ["FirstAlternativeParser", "first", "LongestAlternativeParser", "longest"]
__all__ = ["FirstAlternativeParser", "LongestAlternativeParser", "first", "longest"]

from typing import Generic, Optional, Sequence, Union, overload

Expand Down
2 changes: 1 addition & 1 deletion src/parsita/parsers/_repeated.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ["RepeatedOnceParser", "rep1", "RepeatedParser", "rep"]
__all__ = ["RepeatedOnceParser", "RepeatedParser", "rep", "rep1"]

from typing import Generic, Optional, Sequence, Union, overload

Expand Down
2 changes: 1 addition & 1 deletion src/parsita/parsers/_repeated_seperated.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ["RepeatedSeparatedParser", "repsep", "RepeatedOnceSeparatedParser", "rep1sep"]
__all__ = ["RepeatedOnceSeparatedParser", "RepeatedSeparatedParser", "rep1sep", "repsep"]

from typing import Generic, Optional, Sequence, Union, overload

Expand Down
2 changes: 1 addition & 1 deletion src/parsita/parsers/_sequential.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ["SequentialParser", "DiscardLeftParser", "DiscardRightParser"]
__all__ = ["DiscardLeftParser", "DiscardRightParser", "SequentialParser"]

from typing import Any, Generic, Optional, Sequence

Expand Down
2 changes: 1 addition & 1 deletion src/parsita/parsers/_success.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ["SuccessParser", "success", "FailureParser", "failure"]
__all__ = ["FailureParser", "SuccessParser", "failure", "success"]

from typing import Generic, NoReturn, TypeVar

Expand Down
2 changes: 1 addition & 1 deletion src/parsita/state/_result.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ["Result", "Success", "Failure"]
__all__ = ["Failure", "Result", "Success"]

from typing import TypeVar

Expand Down
2 changes: 1 addition & 1 deletion src/parsita/state/_state.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

__all__ = ["State", "Continue", "Input", "Output", "Element"]
__all__ = ["Continue", "Element", "Input", "Output", "State"]

from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Generic, Optional, TypeVar
Expand Down

0 comments on commit 820da4b

Please sign in to comment.