Skip to content

Commit f1791e0

Browse files
snopokeclaude
andcommitted
refresh lint/format tooling
- Bump pre-commit hooks: ruff-pre-commit v0.2.1 -> v0.15.12, pre-commit-hooks v4.4.0 -> v6.0.0 (both 2+ years stale) - Update ruff hook id from `ruff` (legacy alias) to `ruff-check` per the newer ruff-pre-commit naming - Apply lint findings the bumped ruff surfaces: PT001 (drop () from @pytest.fixture decorators), UP031 (percent-format -> f-string in utils.py), PT030 (add `match` to pytest.warns(DeprecationWarning)) - Drop black and isort from the dev dependency group; ruff and ruff-format already cover both Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f39f170 commit f1791e0

9 files changed

Lines changed: 13 additions & 85 deletions

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ default_language_version:
33
python: python3.12
44
repos:
55
- repo: https://github.com/astral-sh/ruff-pre-commit
6-
rev: v0.2.1
6+
rev: v0.15.12
77
hooks:
8-
- id: ruff
8+
- id: ruff-check
99
args: [ --fix ]
1010
- id: ruff-format
1111
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v4.4.0
12+
rev: v6.0.0
1313
hooks:
1414
- id: check-added-large-files
1515
args: [ --maxkb=2048 ]

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ documentation = "https://docs.taskbadger.net/"
5858

5959
[dependency-groups]
6060
dev = [
61-
"black",
62-
"isort",
6361
"pre-commit",
6462
"pytest",
6563
"pytest-httpx",

taskbadger/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def import_string(dotted_path):
55
try:
66
module_path, class_name = dotted_path.rsplit(".", 1)
77
except ValueError as err:
8-
raise ImportError("%s doesn't look like a module path" % dotted_path) from err
8+
raise ImportError(f"{dotted_path} doesn't look like a module path") from err
99

1010
module = import_module(module_path)
1111

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from taskbadger.mug import Badger, Settings
44

55

6-
@pytest.fixture()
6+
@pytest.fixture
77
def _bind_settings():
88
Badger.current.bind(Settings("https://taskbadger.net", "token", "org", "proj"))
99
yield

tests/test_celery_system_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def _wait_for_mock_calls(mock_obj, expected_count, timeout=5):
3939
time.sleep(0.05)
4040

4141

42-
@pytest.fixture()
42+
@pytest.fixture
4343
def _bind_settings_with_system():
4444
systems = [CelerySystemIntegration()]
4545
Badger.current.bind(

tests/test_cli_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def mock_config_location():
2121
os.remove(config_path)
2222

2323

24-
@pytest.fixture()
24+
@pytest.fixture
2525
def _mock_config(mock_config_location):
2626
config = Config(
2727
organization_slug="test_org",

tests/test_project_key.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_init_legacy_key_emits_deprecation_warning(self):
102102
init("org", "project", "legacy-token")
103103

104104
def test_init_legacy_key_still_works(self):
105-
with pytest.warns(DeprecationWarning):
105+
with pytest.warns(DeprecationWarning, match="Legacy API keys are deprecated"):
106106
init("org", "project", "legacy-token")
107107
settings = Badger.current.settings
108108
assert settings.organization_slug == "org"
@@ -152,7 +152,7 @@ def test_project_key_is_valid(self):
152152
runner = CliRunner()
153153

154154

155-
@pytest.fixture()
155+
@pytest.fixture
156156
def mock_config_location():
157157
config_path = Path(__file__).parent / "_mock_config_project_key"
158158
with mock.patch("taskbadger.config._get_config_path", return_value=config_path):

tests/test_sdk.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ def _init_skd():
2424
init("org", "project", "token")
2525

2626

27-
@pytest.fixture()
27+
@pytest.fixture
2828
def settings():
2929
return Badger.current.settings
3030

3131

32-
@pytest.fixture()
32+
@pytest.fixture
3333
def patched_get():
3434
with mock.patch("taskbadger.sdk.task_get.sync") as get:
3535
yield get
3636

3737

38-
@pytest.fixture()
38+
@pytest.fixture
3939
def patched_create():
4040
with mock.patch("taskbadger.sdk.task_create.sync_detailed") as create:
4141
yield create
4242

4343

44-
@pytest.fixture()
44+
@pytest.fixture
4545
def patched_update():
4646
with mock.patch("taskbadger.sdk.task_partial_update.sync_detailed") as update:
4747
yield update

uv.lock

Lines changed: 0 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)