Skip to content

Commit

Permalink
upath: typo fixes in implementations.local
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- committed Feb 5, 2024
1 parent 652f800 commit a2c2098
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions upath/implementations/local.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import pathlib
import sys
from inspect import ismemberdescriptor
from pathlib import Path
Expand Down Expand Up @@ -99,8 +98,8 @@ def __init__(
self._storage_options = {}

@classmethod
def _from_parts(cls, args, **kwargs):
obj = super(Path, cls)._from_parts(cls, args, **kwargs)
def _from_parts(cls, *args, **kwargs):
obj = super(Path, cls)._from_parts(cls, *args, **kwargs)
obj._protocol = ""
obj._storage_options = {}
return obj
Expand Down Expand Up @@ -128,7 +127,7 @@ class WindowsUPath(WindowsPath, LocalPath):
def __new__(
cls, *args, protocol: str | None = None, **storage_options: Any
) -> UPath:
obj = super(pathlib.Path).__new__(cls, *args)
obj = super().__new__(cls, *args)
obj._protocol = ""
return obj

Expand All @@ -140,8 +139,8 @@ def __init__(
self._storage_options = {}

@classmethod
def _from_parts(cls, args, **kwargs):
obj = super(Path, cls)._from_parts(cls, args, **kwargs)
def _from_parts(cls, *args, **kwargs):
obj = super(Path, cls)._from_parts(cls, *args, **kwargs)
obj._protocol = ""
obj._storage_options = {}
return obj
Expand Down
2 changes: 1 addition & 1 deletion upath/tests/pathlib/test_pathlib_312.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
grp = pwd = None

import upath
from upath.core312plus import UPath
from upath.core import UPath
from upath.implementations.local import PosixUPath, WindowsUPath

import pytest
Expand Down

0 comments on commit a2c2098

Please sign in to comment.