Skip to content

Commit

Permalink
ci: replace black and flake8 by ruff
Browse files Browse the repository at this point in the history
Change-Id: I62144025c8b28e8a72bac1f67d611a84a0ae0eb0
  • Loading branch information
jd committed Dec 13, 2024
1 parent 921a8ba commit 9215cbd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion daiquiri/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def parse_and_set_default_log_levels(
def set_default_log_levels(
loggers_and_log_levels: typing.Iterable[
typing.Tuple[typing.Optional[str], typing.Union[str, int]]
]
],
) -> None:
"""Set default log levels for some loggers.
Expand Down
2 changes: 1 addition & 1 deletion daiquiri/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def do_rollover(self) -> None:

@staticmethod
def _timedelta_to_seconds(
td: typing.Union[float, int, datetime.timedelta]
td: typing.Union[float, int, datetime.timedelta],
) -> float:
"""Convert a datetime.timedelta object into a seconds interval.
Expand Down
1 change: 0 additions & 1 deletion daiquiri/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# flake8: noqa: A005
import logging
import typing

Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ packages = ["daiquiri"]
test = ["pytest"]
systemd = ["systemd-python>=234"]

[tool.black]
target-version = ['py310', 'py311', 'py312', 'py313']

[tool.mypy]
files = "daiquiri"
show_error_codes = true
Expand Down
20 changes: 3 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,14 @@ commands =
basepython = python3.13
deps =
{[testenv]deps}
black
flake8
ruff
mypy
flake8-import-order
flake8-blind-except
flake8-builtins
flake8-docstrings
flake8-rst-docstrings
flake8-logging-format

commands =
black --check .
flake8
ruff format --check .
ruff check .
mypy

[flake8]
show-source = True
exclude=.git,.tox,dist,build,.eggs
application-import-names=daiquiri
# Black ignore those first fours
ignore = E203,E501,W503,E231,A003,D101,D102,D103,D104,D105,D107,A003,D100

[testenv:docs]
deps = sphinx
commands = sphinx-build -b html doc/source doc/build/html

0 comments on commit 9215cbd

Please sign in to comment.