Skip to content

Commit 2337ab7

Browse files
authored
Merge pull request #1625 from wyardley/wyardley/chore/sort_and_setup.cfg
chore: remove isort and old setup.cfg
2 parents 57e1128 + 2eab7e4 commit 2337ab7

File tree

6 files changed

+10
-33
lines changed

6 files changed

+10
-33
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/Alerters/healthchecks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
SimpleMonitor alerts via healthchecks
33
"""
44

5+
import json
56
from typing import cast
67

7-
import json
88
import requests
99

1010
from ..Monitors.monitor import Monitor
11-
from .alerter import Alerter, AlertLength, AlertType, register
1211
from ..util import check_group_match
12+
from .alerter import Alerter, AlertLength, AlertType, register
1313

1414

1515
@register

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")

tests/test_network_new.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import unittest
2+
from unittest.mock import Mock, patch
23

34
from requests import Response
45
from requests.auth import HTTPBasicAuth
5-
from unittest.mock import patch, Mock
66

77
from simplemonitor.Monitors import MonitorHTTP
88
from simplemonitor.util import MonitorState

0 commit comments

Comments
 (0)