Skip to content

Commit

Permalink
Use Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
okomestudio committed Feb 19, 2024
1 parent 190b8ef commit 6650c0c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 34 deletions.
16 changes: 7 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
repos:
- repo: https://github.com/ambv/black
rev: 24.2.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
hooks:
- id: black
language_version: python
- id: ruff
- id: ruff-format

- repo: https://github.com/timothycrosley/isort
rev: 5.13.2
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: isort
language_version: python
additional_dependencies: [toml]
- id: mypy
33 changes: 8 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ dependencies = ["resconfig==20.4.3a0"]

[project.optional-dependencies]
dev = [
"black==24.2.0",
"flake8==7.0.0",
"isort[pyproject]==5.13.2",
"mypy==1.8.0",
"pre-commit==3.6.1",
"ruff==0.2.2",
]

test = [
Expand All @@ -54,23 +52,6 @@ license-files = ["LICENSE.txt"]
include-package-data = true
package-data = {"socket_log_receiver" = []}

[tool.black]
line-length = 88
py36 = true
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''

[tool.coverage.report]
exclude_lines = [
"def __repr__",
Expand All @@ -83,18 +64,20 @@ exclude_lines = [
"raise NotImplementedError",
]

[tool.isort]
line_length = 88
known_first_party = ["socket_log_receiver"]
known_third_party = ["pytest", "resconfig", "setuptools", "xprocess"]

[tool.pytest.ini_options]
minversion = "7.3"
addopts = "-vv --cov=socket_log_receiver --cov-report=term-missing"
testpaths = [
"tests",
]

[too.ruff]
target-version = "py38"

[tool.ruff.lint]
#select = ["ALL"]
extend-select = ["I"]

[tool.mypy]
python_version = "3.11"
check_untyped_defs = true
Expand Down

0 comments on commit 6650c0c

Please sign in to comment.