Skip to content

Commit

Permalink
Remove black, isort
Browse files Browse the repository at this point in the history
Add ruff, reformat code using ruff
  • Loading branch information
insolor committed Sep 1, 2024
1 parent 96baa61 commit 4f3d0ba
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 120 deletions.
3 changes: 1 addition & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ updates:
patterns:
- "pytest*"
- "flake8*"
- "black"
- "isort"
- "mypy"
- "ruff"

- package-ecosystem: "github-actions"
directory: "/"
Expand Down
3 changes: 1 addition & 2 deletions peclasses/annotated_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,4 @@ def __new__(mcs, name, bases, namespace, **kwargs):
return super().__new__(mcs, name, bases, namespace, **kwargs)


class AnnotatedUnion(Union, metaclass=AnnotatedUnionMetaclass):
...
class AnnotatedUnion(Union, metaclass=AnnotatedUnionMetaclass): ...
6 changes: 2 additions & 4 deletions peclasses/bisect_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ def __len__(self) -> int:
return len(self.sequence)

@overload
def __getitem__(self, i: int) -> TValue:
...
def __getitem__(self, i: int) -> TValue: ...

@overload
def __getitem__(self, s: slice) -> Sequence[TValue]:
...
def __getitem__(self, s: slice) -> Sequence[TValue]: ...

def __getitem__(self, arg):
return self.key(self.sequence[arg])
Expand Down
6 changes: 2 additions & 4 deletions peclasses/section_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,10 @@ def which_section_index(self, offset: Optional[Offset] = None, rva: Optional[Rva
raise ValueError("One of arguments (offset or rva) must be filled")

@overload
def __getitem__(self, i: int) -> Section:
...
def __getitem__(self, i: int) -> Section: ...

@overload
def __getitem__(self, s: slice) -> Sequence[Section]:
...
def __getitem__(self, s: slice) -> Sequence[Section]: ...

def __getitem__(self, arg):
return self._sections[arg]
Expand Down
131 changes: 29 additions & 102 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,17 @@ authors = ["insolor <insolor@gmail.com>"]

[tool.poetry.dependencies]
python = "^3.8"
ruff = "^0.6.3"

[tool.poetry.dev-dependencies]
pytest = "^8.3.2"
pytest-cov = "^5.0.0"
flake8 = "^5.0.4"
black = "^24.4.2"
isort = "^5.13.2"
mypy = "^1.11"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.black]
[tool.ruff]
line-length = 120

[tool.isort]
profile = "black"

0 comments on commit 4f3d0ba

Please sign in to comment.