File tree Expand file tree Collapse file tree 5 files changed +15
-8
lines changed
Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 3434# float also accepts integers and longs but we don't want an explicit union
3535# due to type checking complexity
3636NumberT = float
37- ValueT = typing .Union [NumberT , typing . Type [base .UnknownLength ], None ]
37+ ValueT = typing .Union [NumberT , type [base .UnknownLength ], None ]
3838
3939T = types .TypeVar ('T' )
4040
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class SortKey(str, enum.Enum):
4343 PERCENTAGE = 'percentage'
4444
4545
46- class MultiBar (typing . Dict [str , bar .ProgressBar ]):
46+ class MultiBar (dict [str , bar .ProgressBar ]):
4747 fd : typing .TextIO
4848 _buffer : io .StringIO
4949
Original file line number Diff line number Diff line change 22
33import sys
44import typing
5+ from collections .abc import Iterable , Iterator
56from types import TracebackType
6- from typing import Iterable , Iterator
77
88from progressbar import base
99
Original file line number Diff line number Diff line change 88import os
99import re
1010import sys
11+ from collections .abc import Iterable , Iterator
1112from types import TracebackType
12- from typing import Iterable , Iterator
1313
1414from python_utils import types
1515from python_utils .converters import scale_1024
Original file line number Diff line number Diff line change 11# We keep the ruff configuration separate so it can easily be shared across
22# all projects
33
4- target-version = ' py38 '
4+ target-version = ' py39 '
55
66# src = ['progressbar']
77exclude = [
88 ' .venv' ,
99 ' .tox' ,
10+ # Ignore local test files/directories/old-stuff
1011 ' test.py' ,
12+ ' *_old.py' ,
1113]
1214
13- lint.ignore = [
15+ line-length = 79
16+
17+ [lint ]
18+ ignore = [
1419 ' A001' , # Variable {name} is shadowing a Python builtin
1520 ' A002' , # Argument {name} is shadowing a Python builtin
1621 ' A003' , # Class attribute {name} is shadowing a Python builtin
@@ -28,12 +33,14 @@ lint.ignore = [
2833 ' RET506' , # Unnecessary `else` after `raise` statement
2934 ' Q001' , # Remove bad quotes
3035 ' Q002' , # Remove bad quotes
36+ ' FA100' , # Missing `from __future__ import annotations`, but uses `typing.Optional`
3137 ' COM812' , # Missing trailing comma in a list
3238 ' ISC001' , # String concatenation with implicit str conversion
3339 ' SIM108' , # Ternary operators are not always more readable
40+ ' RUF100' , # Unused noqa directives. Due to multiple Python versions, we need to keep them
3441]
35- line-length = 79
36- lint. select = [
42+
43+ select = [
3744 ' A' , # flake8-builtins
3845 ' ASYNC' , # flake8 async checker
3946 ' B' , # flake8-bugbear
You can’t perform that action at this time.
0 commit comments