Skip to content

Commit bcd81f6

Browse files
authored
Fix lints (#664)
With upgrading to Python 3.12 in CI, new lints popped up. While at it, bumping flake8's version as well.
1 parent d18de38 commit bcd81f6

39 files changed

+20
-20
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
exclude: ^diagrams/
1919
args: [ --markdown-linebreak-ext=md ]
2020
- repo: https://github.com/pycqa/flake8
21-
rev: 7.1.1
21+
rev: 7.2.0
2222
hooks:
2323
- id: flake8
2424
additional_dependencies:

boltstub/packstream.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
from struct import pack as struct_pack
2424
from struct import unpack as struct_unpack
2525

26-
from .simple_jolt.common import types as jolt_common_types
27-
from .simple_jolt.v1 import types as jolt_v1_types
28-
from .simple_jolt.v2 import types as jolt_v2_types
26+
from .simple_jolt.common import jolt_types as jolt_common_types
27+
from .simple_jolt.v1 import jolt_types as jolt_v1_types
28+
from .simple_jolt.v2 import jolt_types as jolt_v2_types
2929

3030
_jolt_types = {
3131
1: jolt_v1_types,

boltstub/parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
ServerExit,
4747
)
4848
from .packstream import Structure
49-
from .simple_jolt.common.types import (
49+
from .simple_jolt.common.jolt_types import (
5050
JoltType,
5151
JoltWildcard,
5252
)

boltstub/simple_jolt/v1/codec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
NoFullRepresentation,
2828
NoSimpleRepresentation,
2929
)
30-
from .types import (
30+
from .jolt_types import (
3131
JoltDate,
3232
JoltDateTime,
3333
JoltDuration,

boltstub/simple_jolt/v1/types.py renamed to boltstub/simple_jolt/v1/jolt_types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import pytz
2424

2525
from ..common.errors import JOLTValueError
26-
from ..common.types import _JoltParsedType
27-
from ..common.types import JoltType as _JoltTypeCommon
28-
from ..common.types import JoltWildcard
26+
from ..common.jolt_types import _JoltParsedType
27+
from ..common.jolt_types import JoltType as _JoltTypeCommon
28+
from ..common.jolt_types import JoltWildcard
2929

3030

3131
class JoltType(_JoltTypeCommon): # version specific type base class

boltstub/simple_jolt/v2/codec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
JoltReverseRelationTransformer,
4343
JoltTypeTransformer,
4444
)
45-
from .types import (
45+
from .jolt_types import (
4646
JoltDate,
4747
JoltDateTime,
4848
JoltDuration,

boltstub/simple_jolt/v2/types.py renamed to boltstub/simple_jolt/v2/jolt_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
import pytz
2222

23-
from ..common.types import (
23+
from ..common.jolt_types import (
2424
JoltType,
2525
JoltWildcard,
2626
)
27-
from ..v1.types import (
27+
from ..v1.jolt_types import (
2828
JoltV1DateMixin,
2929
JoltV1DateTimeMixin,
3030
JoltV1DurationMixin,

boltstub/tests/simple_jolt/v1/parse_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import json
2020

21-
from ....simple_jolt.v1.types import (
21+
from ....simple_jolt.v1.jolt_types import (
2222
JoltDate,
2323
JoltDateTime,
2424
JoltDuration,

boltstub/tests/simple_jolt/v1/test_parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
dumps_simple,
2727
loads,
2828
)
29-
from ....simple_jolt.v1.types import (
29+
from ....simple_jolt.v1.jolt_types import (
3030
JoltDate,
3131
JoltDateTime,
3232
JoltDuration,

boltstub/tests/simple_jolt/v2/parse_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import json
2020

21-
from ....simple_jolt.v2.types import (
21+
from ....simple_jolt.v2.jolt_types import (
2222
JoltDate,
2323
JoltDateTime,
2424
JoltDuration,

boltstub/tests/simple_jolt/v2/test_parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
dumps_simple,
2727
loads,
2828
)
29-
from ....simple_jolt.v2.types import (
29+
from ....simple_jolt.v2.jolt_types import (
3030
JoltDate,
3131
JoltDateTime,
3232
JoltDuration,

boltstub/tests/test_packstream.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import pytest
2222

2323
from ..bolt_protocol import Structure
24-
from ..simple_jolt.v1 import types as jolt_v1_types
25-
from ..simple_jolt.v2 import types as jolt_v2_types
24+
from ..simple_jolt.v1 import jolt_types as jolt_v1_types
25+
from ..simple_jolt.v2 import jolt_types as jolt_v2_types
2626

2727

2828
@pytest.mark.parametrize(("packstream_version", "fields", "res"), (

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ remove_redundant_aliases=true
1212

1313
[flake8]
1414
inline-quotes=double
15-
ignore=A003,D100,D101,D102,D103,D104,D105,D106,D107,E241,W503
15+
ignore=A003,D100,D101,D102,D103,D104,D105,D106,D107,E241,W503,F824
1616
per-file-ignores=
1717
nutkit/protocol/requests.py:N803,A002
1818
nutkit/protocol/responses.py:N803,A002
File renamed without changes.

tests/stub/summary/test_summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def test_multiple_notifications(self):
473473
"_severity": "WARNING",
474474
"_classification": "GENERIC",
475475
"_position": {"column": 9, "offset": 8, "line": 1 + i},
476-
},
476+
}, # noqa: E122 - looks better
477477
}
478478
for i in range(1, 4)
479479
]

0 commit comments

Comments
 (0)