Skip to content

Commit

Permalink
pyright fixes for older python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed Aug 28, 2024
1 parent 1c4b639 commit 23170ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions progressbar/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# float also accepts integers and longs but we don't want an explicit union
# due to type checking complexity
NumberT = float
ValueT: typing.TypeAlias = typing.Union[
ValueT = typing.Union[
NumberT, typing.Type[base.UnknownLength], None
]

Expand Down Expand Up @@ -977,7 +977,7 @@ def start(
init: bool = True,
*args: typing.Any,
**kwargs: typing.Any,
) -> typing.Self:
) -> ProgressBar:
"""Starts measuring time, and prints the bar at 0%.
It returns self so you can use it like this:
Expand Down
18 changes: 6 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ envlist =
py311
docs
black
pyright
ruff
; mypy
; codespell
skip_missing_interpreters = True

[testenv]
deps = -r{toxinidir}/tests/requirements.txt
commands = py.test --basetemp="{envtmpdir}" --confcutdir=.. {posargs}
;changedir = tests
deps =
-r{toxinidir}/tests/requirements.txt
pyright
commands =
pyright
py.test --basetemp="{envtmpdir}" --confcutdir=.. {posargs}
skip_install = true

[testenv:mypy]
Expand All @@ -24,14 +26,6 @@ basepython = python3
deps = mypy
commands = mypy {toxinidir}/progressbar

[testenv:pyright]
changedir =
basepython = python3
deps =
pyright
python_utils
commands = pyright {toxinidir}/progressbar

[testenv:black]
basepython = python3
deps = black
Expand Down

0 comments on commit 23170ee

Please sign in to comment.