Replace PathLike unions with aliases from _typeshed (#5467)

Standardize on 'from os import PathLike'
This commit is contained in:
Sebastian Rittau
2021-05-16 21:38:00 +02:00
committed by GitHub
parent d72b1e8149
commit e5abd08f93
9 changed files with 30 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
import os
import sys
from _typeshed import AnyPath
from datetime import date, datetime, time
from typing import Any, Callable, Generator, Iterable, Iterator, List, Optional, Protocol, Tuple, Type, TypeVar, Union
@@ -66,7 +66,7 @@ def complete_statement(sql: str) -> bool: ...
if sys.version_info >= (3, 7):
def connect(
database: Union[bytes, str, os.PathLike[str]],
database: AnyPath,
timeout: float = ...,
detect_types: int = ...,
isolation_level: Optional[str] = ...,