Skip to content

Commit 5f5fa52

Browse files
Enforce ruff/bugbear rule B034
B034 `re.split` should pass `maxsplit` and `flags` as keyword arguments to avoid confusion due to unintuitive argument positions
1 parent b90ae9a commit 5f5fa52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fsspec/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def isfilelike(f: Any) -> TypeGuard[IO[bytes]]:
435435

436436
def get_protocol(url: str) -> str:
437437
url = stringify_path(url)
438-
parts = re.split(r"(\:\:|\://)", url, 1)
438+
parts = re.split(r"(\:\:|\://)", url, maxsplit=1)
439439
if len(parts) > 1:
440440
return parts[0]
441441
return "file"

0 commit comments

Comments
 (0)