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":
|
) -> "Config":
|
||||||
if args is None:
|
if args is None:
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
# TODO: Remove type-ignore after next mypy release.
|
elif isinstance(args, os.PathLike):
|
||||||
# https://github.com/python/typeshed/commit/076983eec45e739c68551cb6119fd7d85fd4afa9
|
|
||||||
elif isinstance(args, os.PathLike): # type: ignore[misc]
|
|
||||||
args = [os.fspath(args)]
|
args = [os.fspath(args)]
|
||||||
elif not isinstance(args, list):
|
elif not isinstance(args, list):
|
||||||
msg = "`args` parameter expected to be a list of strings, got: {!r} (type: {})"
|
msg = "`args` parameter expected to be a list of strings, got: {!r} (type: {})"
|
||||||
|
|
Loading…
Reference in New Issue