Skip to content

Commit

Permalink
Merge pull request #30 from Raniz85/ruff
Browse files Browse the repository at this point in the history
Replace flake8 and isort with ruff
  • Loading branch information
Raniz85 authored Sep 15, 2023
2 parents e9a314a + d446170 commit ffd88a5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
10 changes: 0 additions & 10 deletions .flake8

This file was deleted.

5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ init:
poetry install

lint:
poetry run flake8 src/ tests/
poetry run ruff check src tests

stylecheck:
poetry run black --check src/ tests/

format:
poetry run black src/ tests/
poetry run isort src/ tests/


typecheck:
MYPYPATH="src/" poetry run mypy --namespace-packages --explicit-package-bases src/

Expand Down
15 changes: 7 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@ python = "^3.9"

[tool.poetry.group.dev.dependencies]
black = "^23.1.0"
flake8 = "^6.0.0"
flake8-bandit = "^4.1.1"
flake8-bugbear = "^23.3.12"
flake8-docstrings = "^1.6.0"
flake8-isort = "^6.0.0"
isort = "^5.10.1"
mypy = "^1.1"
pytest = "^7.2.0"
pytest-cov = "^4.0.0"
pytest-mock = "^3.10.0"
ruff = "^0.0.289"

[tool.isort]
profile = "black"
[tool.ruff]
select = ["ALL"]
ignore = ["D211", "D213"]

[tool.ruff.per-file-ignores]
"tests/**" = ["D", "S101", "S105", "INP001", "ANN201"]

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
3 changes: 3 additions & 0 deletions src/hello_world/message.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""Message module."""


def get_message() -> str:
"""Get the message."""
return "Hello World!"

0 comments on commit ffd88a5

Please sign in to comment.