ruff: enable FBT rules to detect boolean arguments use without kwargs
This commit is contained in:
parent
118c2d4484
commit
664c40e3e8
19 changed files with 50 additions and 39 deletions
|
@ -30,7 +30,7 @@ Stats = Dict[str, Any]
|
|||
|
||||
|
||||
class StatsFun(Protocol):
|
||||
def __call__(self, quick: bool = False) -> Stats: ...
|
||||
def __call__(self, *, quick: bool = False) -> Stats: ...
|
||||
|
||||
|
||||
# global state that turns on/off quick stats
|
||||
|
@ -176,7 +176,7 @@ def guess_stats(module: ModuleType) -> Optional[StatsFun]:
|
|||
if len(providers) == 0:
|
||||
return None
|
||||
|
||||
def auto_stats(quick: bool = False) -> Stats:
|
||||
def auto_stats(*, quick: bool = False) -> Stats:
|
||||
res = {}
|
||||
for k, v in providers.items():
|
||||
res.update(stat(v, quick=quick, name=k))
|
||||
|
@ -355,7 +355,7 @@ def _stat_item(item):
|
|||
return _guess_datetime(item)
|
||||
|
||||
|
||||
def _stat_iterable(it: Iterable[Any], quick: bool = False) -> Stats:
|
||||
def _stat_iterable(it: Iterable[Any], *, quick: bool = False) -> Stats:
|
||||
from more_itertools import first, ilen, take
|
||||
|
||||
# todo not sure if there is something in more_itertools to compute this?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue