cmds / lib: Fix more static checker findings
Fix more errors and warnings produced by "make check" as reported by CI and a pyright upgrade. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
cdc1ce9f33
commit
24928c6f5d
16 changed files with 123 additions and 122 deletions
|
|
@ -161,7 +161,6 @@ class Local(Base):
|
|||
async def _erase(self, path: str) -> None:
|
||||
if os.path.isdir(path):
|
||||
import shutil
|
||||
|
||||
shutil.rmtree(path)
|
||||
return
|
||||
os.unlink(path)
|
||||
|
|
@ -169,8 +168,8 @@ class Local(Base):
|
|||
async def _rename(self, src: str, dst: str) -> None:
|
||||
os.rename(src, dst)
|
||||
|
||||
async def _mkdir(self, name: str, mode: int) -> None:
|
||||
os.mkdir(name, mode)
|
||||
async def _mkdir(self, path: str, mode: int) -> None:
|
||||
os.mkdir(path, mode)
|
||||
|
||||
async def _stat(self, path: str, follow_symlinks: bool) -> StatResult:
|
||||
return StatResult.from_os(os.stat(path, follow_symlinks = follow_symlinks))
|
||||
|
|
|
|||
Loading…
Reference in a new issue