typeshed `os.PathLike` is now `@runtime_checkable`, remove mypy ignore
This commit is contained in:
parent
6247a95601
commit
1b9ba65b3f
|
@ -305,9 +305,7 @@ def _prepareconfig(
|
|||
) -> "Config":
|
||||
if args is None:
|
||||
args = sys.argv[1:]
|
||||
# TODO: Remove type-ignore after next mypy release.
|
||||
# https://github.com/python/typeshed/commit/076983eec45e739c68551cb6119fd7d85fd4afa9
|
||||
elif isinstance(args, os.PathLike): # type: ignore[misc]
|
||||
elif isinstance(args, os.PathLike):
|
||||
args = [os.fspath(args)]
|
||||
elif not isinstance(args, list):
|
||||
msg = "`args` parameter expected to be a list of strings, got: {!r} (type: {})"
|
||||
|
|
Loading…
Reference in New Issue