Skip to content

Commit 4c32775

Browse files
committed
_Pepc: Address a bunch of warnings
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
1 parent 109f7d7 commit 4c32775

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

pepctools/_Pepc.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
_ARGCOMPLETE_AVAILABLE = True
2222
except ImportError:
2323
# We can live without argcomplete, we only lose tab completions.
24+
argcomplete = object()
2425
_ARGCOMPLETE_AVAILABLE = False
2526

2627
import typing
@@ -791,7 +792,7 @@ def _build_arguments_parser() -> ArgParse.ArgsParser:
791792
help=text)
792793

793794
if _ARGCOMPLETE_AVAILABLE:
794-
argcomplete.autocomplete(parser)
795+
getattr(argcomplete, "autocomplete")(parser)
795796

796797
return parser
797798

@@ -1212,8 +1213,8 @@ def main() -> int:
12121213
do_main()
12131214
except KeyboardInterrupt:
12141215
_LOG.info("\nInterrupted, exiting")
1215-
except Error as err:
1216-
_LOG.error_out(err)
1216+
except Error as _err:
1217+
_LOG.error_out(str(_err))
12171218

12181219
return 0
12191220

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ skip-checking-raises = true
5959

6060
[tool.mypy]
6161
check_untyped_defs = true
62+
63+
[tool.pyright]
64+
# Disable the warning that makes it very hard working with typed dicts.
65+
reportTypedDictNotRequiredAccess = false

0 commit comments

Comments
 (0)