Skip to content

Commit c3e5f76

Browse files
committed
style: apply updated ruff and pre-commit rules
Refs: NS-193
1 parent 7694bcb commit c3e5f76

12 files changed

Lines changed: 14 additions & 18 deletions

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ SENTRY_TRACES_SAMPLE_RATE=0.1
2323
ALLOWED_HOSTS=*
2424

2525
AUDIT_LOG_ENABLED=1
26-
AUDIT_LOG_STORE_OBJECT_STATE=old-and-new
26+
AUDIT_LOG_STORE_OBJECT_STATE=old-and-new

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ updates:
99
# Disable version updates and only allow security updates
1010
open-pull-requests-limit: 0
1111
- "City-of-Helsinki/kuva-backend"
12-
- "City-of-Helsinki/kuva-developers"
12+
- "City-of-Helsinki/kuva-developers"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ venv/
8080
.ruff_cache/
8181
docker-compose.env
8282
docker-compose.env.yaml
83-
.vscode/
83+
.vscode/

api/tests/test_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
@pytest.fixture(autouse=True)
1414
def autouse_db(db):
1515
"""Rename the db fixture"""
16-
pass
1716

1817

1918
SMS_PAYLOAD: SendMessagePayload = {

api/tests/test_audit_log.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ def test_bulk_deleting_delivery_logs_writes_delete_log(admin_user):
161161
client = Client()
162162
client.force_login(admin_user)
163163

164-
COUNT = 3
164+
count = 3
165165

166-
delivery_logs = DeliveryLogFactory.create_batch(COUNT)
166+
delivery_logs = DeliveryLogFactory.create_batch(count)
167167
object_ids = [str(log.pk) for log in delivery_logs]
168168

169169
# Get the URL for the changelist view
@@ -187,7 +187,7 @@ def test_bulk_deleting_delivery_logs_writes_delete_log(admin_user):
187187
audit_log_entry = qs.first()
188188

189189
# Verify the audit log entry details
190-
assert len(audit_log_entry.message["audit_event"]["target"]["object_ids"]) == COUNT
190+
assert len(audit_log_entry.message["audit_event"]["target"]["object_ids"]) == count
191191
assert sorted(
192192
audit_log_entry.message["audit_event"]["target"]["object_ids"]
193193
) == sorted(object_ids)

audit_log/exceptions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
class AuditLoggingDisabledError(Exception):
22
"""Raised when audit logging is disabled and an attempt is made to log an event."""
3-
4-
pass

common/tests/test_prune_django_admin_log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_valid_months(
7272
dry_run_msg = "Running in dry-run mode i.e. not committing changes!\n"
7373
del_msg = (
7474
f"Deleted {expected_deletion_count} Django admin logs "
75-
f"created at least {5*12 if months is None else months} months ago"
75+
f"created at least {5 * 12 if months is None else months} months ago"
7676
)
7777
assert captured.err == ""
7878
assert del_msg in captured.out

keycloak/realm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@
5050
]
5151
}
5252
]
53-
}
53+
}

openapi.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,3 @@ components:
181181
in: header
182182
name: Authorization
183183
description: DRF TokenAuthentication. You need to generate an API token for each client.
184-

pipelines/notification-service-api-review.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
trigger: none
99

1010
# Pull request (PR) triggers cause a pipeline to run whenever a pull request is
11-
# opened with one of the specified target branches, or when updates are made to
11+
# opened with one of the specified target branches, or when updates are made to
1212
# such a pull request.
1313
#
14-
# GitHub creates a new ref when a pull request is created. The ref points to a
15-
# merge commit, which is the merged code between the source and target branches
14+
# GitHub creates a new ref when a pull request is created. The ref points to a
15+
# merge commit, which is the merged code between the source and target branches
1616
# of the pull request.
1717
#
18-
# Opt out of pull request validation
18+
# Opt out of pull request validation
1919
pr:
2020
# PR target branch
2121
branches:

0 commit comments

Comments
 (0)