Merge pull request #8963 from symonk/mypy-pathlike-runtime-checkable-fix
typeshed `os.PathLike` is now `@runtime_checkable`, remove mypy ignore
This commit is contained in:
commit
0fd0e2a27c
|
@ -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