Skip to content

Commit

Permalink
Fix mypy issues in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
0phoff committed Mar 27, 2024
1 parent 03158aa commit 9b3a3bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ mypy = "^1.6.1"
ruff = "^0.3.4"

[tool.mypy]
python_version = "3.9"
follow_imports = 'silent'
strict_optional = true
warn_redundant_casts = true
Expand All @@ -38,11 +39,10 @@ no_implicit_reexport = true
disallow_untyped_defs = true
ignore_missing_imports = true
show_error_codes = true
python_version = "3.9"

[tool.ruff]
line-length = 150
target-version = "py39"
line-length = 150
extend-exclude = [".sandbox"]

[tool.ruff.lint]
Expand Down
8 changes: 4 additions & 4 deletions striker/plugins/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import time

from rich.progress import BarColumn, MofNCompleteColumn, Progress, ProgressColumn, TextColumn, filesize
from rich.progress import BarColumn, MofNCompleteColumn, Progress, ProgressColumn, TextColumn, filesize # type: ignore[attr-defined]
from rich.table import Column
from rich.text import Text

Expand Down Expand Up @@ -306,9 +306,9 @@ def render_speed(cls, speed: Optional[float]) -> Text:
unit, suffix = filesize.pick_unit_and_suffix(int(speed), ['s', 'm', 'h'], 60)
speed /= unit

if suffix == 'h' and speed >= 36: # type: ignore[operator]
# Over 1.5 days, so we show in days instead of hours
speed /= 24 # type: ignore[operator]
# Over 1.5 days, so we show in days instead of hours
if suffix == 'h' and speed >= 36:
speed /= 24
suffix = 'd'

return Text(f'({speed:.1f} {suffix}/it)', style='progress.remaining')
Expand Down

0 comments on commit 9b3a3bc

Please sign in to comment.