Skip to content

Commit 09dc3e1

Browse files
authored
Run formatting and remove ruff warnings (#890)
Run formatting and remove ruff warnings
1 parent 3dc7e2f commit 09dc3e1

File tree

13 files changed

+18
-8
lines changed

13 files changed

+18
-8
lines changed

bin/lint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ FORMAT_CMD="$POETRY_RUN ruff format ."
1111
# Scan only files fixed into the repo, omit poetry.lock
1212
DETECT_SECRETS_FILES="$(git ls-tree --full-tree -r --name-only HEAD | grep -v poetry.lock)"
1313
DETECT_SECRETS_CMD="$POETRY_RUN detect-secrets-hook $DETECT_SECRETS_FILES --baseline .secrets.baseline"
14-
15-
LINT_CMD="$POETRY_RUN ruff ."
14+
15+
LINT_CMD="$POETRY_RUN ruff check ."
1616

1717
MYPY_CMD="$POETRY_RUN mypy jbi"
1818

@@ -50,7 +50,7 @@ if [ -z "$1" ]; then
5050
else
5151
subcommand=$1; shift
5252
case $subcommand in
53-
"format")
53+
"format")
5454
if [ -n "$1" ] && [ "$1" != "--fix" ]; then
5555
usage
5656
else
@@ -78,7 +78,7 @@ else
7878
"detect-secrets")
7979
$DETECT_SECRETS_CMD
8080
;;
81-
*)
81+
*)
8282
usage
8383
;;
8484
esac

jbi/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
This part of the code is not aware of the HTTP context it runs in.
55
"""
6+
67
from enum import Enum
78

89

jbi/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Core FastAPI app (setup, middleware)
33
"""
4+
45
import logging
56
import time
67
from pathlib import Path

jbi/common/instrument.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
ServiceHealth: Return type that service health checks should use
44
InstrumentedClient: wraps service clients so that we can track their usage
55
"""
6+
67
import logging
78
from functools import wraps
89
from typing import Sequence, Type

jbi/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Parsing and validating the YAML configuration occurs within this module
33
"""
4+
45
import logging
56

67
from pydantic import ValidationError

jbi/environment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Module dedicated to interacting with the environment (variables, version.json)
33
"""
4+
45
import json
56

67
# https://github.com/python/mypy/issues/12841

jbi/jira/service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,9 @@ def check_jira_all_project_issue_types_exist(actions, _get_service):
570570
action_issue_types = set(action.parameters.issue_type_map.values())
571571
project_issue_types = issue_types_by_project.get(action.jira_project_key, set())
572572
if missing_issue_types := action_issue_types - project_issue_types:
573-
missing_issue_types_by_project[
574-
action.jira_project_key
575-
] = missing_issue_types
573+
missing_issue_types_by_project[action.jira_project_key] = (
574+
missing_issue_types
575+
)
576576
if missing_issue_types_by_project:
577577
return [
578578
checks.Warning(

jbi/log.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Dedicated module for logging configuration and setup
33
"""
4+
45
import logging
56
import logging.config
67
import sys

jbi/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Python Module for Pydantic Models and validation
33
"""
4+
45
import functools
56
import logging
67
import warnings

jbi/router.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Core FastAPI app (setup, middleware)
33
"""
4+
45
import secrets
56
from pathlib import Path
67
from typing import Annotated, Optional

0 commit comments

Comments
 (0)