typeshed `os.PathLike` is now `@runtime_checkable`, remove mypy ignore

This commit is contained in:
symonk 2021-07-31 14:00:36 +01:00
parent 6247a95601
commit 1b9ba65b3f
1 changed files with 1 additions and 3 deletions

View File

@ -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: {})"