Skip to content

Commit f152ae6

Browse files
committed
chore: remove isort and old setup.cfg
- Remove isort from pre-commit config - Use builtin isort rules within ruff - Select F and most E class rules in ruff explicitly - Remove `setup.cfg` and move most of its configuration into `pyproject.toml` - Remove Python 3.8 hack in `version.py`
1 parent e31aba4 commit f152ae6

File tree

4 files changed

+7
-30
lines changed

4 files changed

+7
-30
lines changed

.pre-commit-config.yaml

-8
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ repos:
2121
- id: ruff
2222
args: [--fix]
2323
- id: ruff-format
24-
- repo: https://github.com/asottile/seed-isort-config
25-
rev: v2.2.0
26-
hooks:
27-
- id: seed-isort-config
28-
- repo: https://github.com/pre-commit/mirrors-isort
29-
rev: v5.9.2
30-
hooks:
31-
- id: isort
3224
- repo: https://github.com/pre-commit/mirrors-mypy
3325
rev: v0.910
3426
hooks:

pyproject.toml

+6
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,14 @@ types-requests = "^2.31.0"
7575
types-pyOpenSSL = "^24.1.0"
7676
types-setuptools = "^75.6.0"
7777

78+
[tool.mypy]
79+
ignore_missing_imports = true
80+
7881
[tool.ruff.lint]
7982
ignore = ["F401"]
83+
# Ruff defaults (F + some E), as well as I (isort) and W.
84+
# Maybe consider adding some subset of "D" here as well
85+
select = ["E4", "E7", "E9", "F", "I", "W"]
8086

8187
[build-system]
8288
requires = ["poetry-core>=1.0.0"]

setup.cfg

-21
This file was deleted.

simplemonitor/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from importlib_metadata import version # compat lib for < 3.8
1+
from importlib.metadata import version
22

33
# VERSION = pkg_resources.get_distribution("simplemonitor").version
44
VERSION = version("simplemonitor")

0 commit comments

Comments
 (0)