general: initial flake8 checks (for now manual)

fix fairly uncontroversial stuff in my.core like
- line spacing, which isn't too annoying (e.g. unlike many inline whitespace checks that break vertical formatting)
- unused imports/variables
- too broad except
This commit is contained in:
Dima Gerasimov 2022-06-05 18:43:36 +01:00 committed by karlicoss
parent fd0c65d176
commit 016f28250b
19 changed files with 124 additions and 58 deletions

View file

@ -78,7 +78,7 @@ def kopen(path: PathIsh, *args, mode: str='rt', **kwargs) -> IO[str]:
tf = tarfile.open(pp)
# TODO pass encoding?
x = tf.extractfile(*args); assert x is not None
return x # type: ignore[return-value]
return x # type: ignore[return-value]
else:
return pp.open(mode, *args, **kwargs)