ruff: process remaining existing checks and suppress the annoying ones
This commit is contained in:
parent
1c5efc46aa
commit
d58453410c
6 changed files with 38 additions and 8 deletions
|
@ -27,7 +27,7 @@ class Ext:
|
|||
def is_compressed(p: Path) -> bool:
|
||||
# todo kinda lame way for now.. use mime ideally?
|
||||
# should cooperate with kompress.kopen?
|
||||
return any(p.name.endswith(ext) for ext in {Ext.xz, Ext.zip, Ext.lz4, Ext.zstd, Ext.zst, Ext.targz})
|
||||
return any(p.name.endswith(ext) for ext in [Ext.xz, Ext.zip, Ext.lz4, Ext.zstd, Ext.zst, Ext.targz])
|
||||
|
||||
|
||||
def _zstd_open(path: Path, *args, **kwargs) -> IO:
|
||||
|
|
|
@ -14,7 +14,7 @@ from typing import (
|
|||
)
|
||||
|
||||
from . import compat
|
||||
from . import warnings as warnings
|
||||
from . import warnings
|
||||
|
||||
# some helper functions
|
||||
# TODO start deprecating this? soon we'd be able to use Path | str syntax which is shorter and more explicit
|
||||
|
|
|
@ -123,7 +123,7 @@ class always_supports_sequence(Iterator[V]):
|
|||
self.it = it
|
||||
self._list: Optional[List] = None
|
||||
|
||||
def __iter__(self) -> Iterator[V]:
|
||||
def __iter__(self) -> Iterator[V]: # noqa: PYI034
|
||||
return self.it.__iter__()
|
||||
|
||||
def __next__(self) -> V:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue