diff --git a/dev/generate_flavours.py b/dev/generate_flavours.py index aeb36390..34caecef 100644 --- a/dev/generate_flavours.py +++ b/dev/generate_flavours.py @@ -118,27 +118,17 @@ def __init_subclass__(cls: Any, **kwargs): def _fix_abstract_file_system(x: str) -> str: x = re.sub( - "protocol = 'abstract'", - "protocol: str | tuple[str, ...] = 'abstract'", - x - ) - x = re.sub( - "root_marker = ''", - "root_marker: Literal['', '/'] = ''", - x - ) - x = re.sub( - "sep = '/'", - "sep: Literal['/'] = '/'", - x + "protocol = 'abstract'", "protocol: str | tuple[str, ...] = 'abstract'", x ) + x = re.sub("root_marker = ''", "root_marker: Literal['', '/'] = ''", x) + x = re.sub("sep = '/'", "sep: Literal['/'] = '/'", x) return x def _fix_azure_blob_file_system(x: str) -> str: x = re.sub( r"if isinstance\(path, list\):", - 'if isinstance(path, list): # type: ignore[unreachable]', + "if isinstance(path, list): # type: ignore[unreachable]", x, ) x = re.sub( diff --git a/noxfile.py b/noxfile.py index 74ebd6ba..88b1cead 100644 --- a/noxfile.py +++ b/noxfile.py @@ -96,10 +96,13 @@ def typesafety(session): session.install("-e", ".[tests]") session.run( "python", - "-m", "pytest", + "-m", + "pytest", "-v", - "-p", "pytest-mypy-plugins", - "--mypy-pyproject-toml-file", "pyproject.toml", + "-p", + "pytest-mypy-plugins", + "--mypy-pyproject-toml-file", + "pyproject.toml", "typesafety", ) diff --git a/upath/_flavour.py b/upath/_flavour.py index cf13f87c..770365cd 100644 --- a/upath/_flavour.py +++ b/upath/_flavour.py @@ -278,9 +278,7 @@ def join(self, path: PathOrStr, *paths: PathOrStr) -> str: pN = list(map(self.stringify_path, paths)) drv = "" if self.supports_empty_parts: - return drv + self.sep.join( - [str_remove_suffix(p0, self.sep), *pN] - ) + return drv + self.sep.join([str_remove_suffix(p0, self.sep), *pN]) else: return drv + posixpath.join(p0, *pN)