Skip to content

Commit 2b6ed63

Browse files
authored
chore: Fix linting using newer lint-python-action (#281)
1 parent 9e51db7 commit 2b6ed63

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

karton/core/backend.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,9 +1040,11 @@ def remove_object_versions(
10401040
"""
10411041
deletion_chunks = chunks(
10421042
[
1043-
{"Key": uid, "VersionId": version_id}
1044-
if version_id != "null" or explicit_version_null
1045-
else {"Key": uid}
1043+
(
1044+
{"Key": uid, "VersionId": version_id}
1045+
if version_id != "null" or explicit_version_null
1046+
else {"Key": uid}
1047+
)
10461048
for uid, versions in object_versions.items()
10471049
for version_id in versions
10481050
],

karton/core/config.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,10 @@ def has_option(self, section_name: str, option_name: str) -> bool:
111111
return True
112112

113113
@overload
114-
def getint(self, section_name: str, option_name: str, fallback: int) -> int:
115-
...
114+
def getint(self, section_name: str, option_name: str, fallback: int) -> int: ...
116115

117116
@overload
118-
def getint(self, section_name: str, option_name: str) -> Optional[int]:
119-
...
117+
def getint(self, section_name: str, option_name: str) -> Optional[int]: ...
120118

121119
def getint(
122120
self, section_name: str, option_name: str, fallback: Optional[int] = None
@@ -131,12 +129,12 @@ def getint(
131129
return int(value)
132130

133131
@overload
134-
def getboolean(self, section_name: str, option_name: str, fallback: bool) -> bool:
135-
...
132+
def getboolean(
133+
self, section_name: str, option_name: str, fallback: bool
134+
) -> bool: ...
136135

137136
@overload
138-
def getboolean(self, section_name: str, option_name: str) -> Optional[bool]:
139-
...
137+
def getboolean(self, section_name: str, option_name: str) -> Optional[bool]: ...
140138

141139
def getboolean(
142140
self, section_name: str, option_name: str, fallback: Optional[bool] = None

karton/core/karton.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Base library for karton subsystems.
33
"""
4+
45
import abc
56
import argparse
67
import sys

karton/core/test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"""
22
Test stubs for karton subsystem unit tests
33
"""
4+
45
import hashlib
56
import logging
67
import unittest
78
from collections import defaultdict
8-
from typing import Any, BinaryIO, Dict, List, Union, cast
9+
from typing import Any, BinaryIO, Dict, List, Optional, Union, cast
910
from unittest import mock
1011

1112
from .backend import KartonBackend, KartonMetrics
@@ -66,7 +67,7 @@ def upload_object(
6667
bucket: str,
6768
object_uid: str,
6869
content: Union[bytes, BinaryIO],
69-
length: int = None,
70+
length: Optional[int] = None,
7071
) -> None:
7172
log.debug("Uploading object %s to bucket %s", object_uid, bucket)
7273
if isinstance(content, bytes):

0 commit comments

Comments
 (0)