Skip to content

Commit 3d4deaa

Browse files
committed
Fixup python lints
1 parent 9521dce commit 3d4deaa

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

partitionmanager/dropper_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def test_no_droppable_partitions(self):
8080
table.set_retention_period(timedelta(days=2))
8181
current_timestamp = datetime(2021, 1, 1, tzinfo=timezone.utc)
8282
current_position = PositionPartition("p_20210102").set_position([10])
83-
assert {} == get_droppable_partitions(
83+
assert get_droppable_partitions == {}(
8484
database, [], current_position, current_timestamp, table
8585
)
8686

partitionmanager/stats.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ def get_statistics(partitions, current_timestamp, table):
113113
log.debug(f"{table} had partitions that aren't comparable: {a} and {b}")
114114
continue
115115
d = b.timestamp() - a.timestamp()
116-
if d > max_d:
117-
max_d = d
116+
max_d = max(max_d, d)
118117

119118
if max_d > timedelta():
120119
results["max_partition_delta"] = max_d

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,12 @@ select = [
101101
# "TRY", # tryceratops
102102
]
103103
ignore = [
104-
"ISC001", # Implicit string concatenation can conflict with ruff format
105-
"S101", # Allow assert statements
104+
"ISC001", # Implicit string concatenation can conflict with ruff format
105+
"S101", # Allow assert statements
106+
"LOG015", # Call on root logger
107+
"BLE001", # Do not catch blind exception
108+
"PLW1641", # Object does not implement __hash__ method
109+
"PLC0415", # import should be at the top-level of a file
106110
]
107111

108112
[tool.ruff.lint.mccabe]

0 commit comments

Comments
 (0)