mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
Update vendored windows libs
This commit is contained in:
parent
f61c211655
commit
b1cefa94e5
226 changed files with 33472 additions and 11882 deletions
27
libs/win/path/classes.py
Normal file
27
libs/win/path/classes.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
import functools
|
||||
|
||||
|
||||
class ClassProperty(property):
|
||||
def __get__(self, cls, owner):
|
||||
return self.fget.__get__(None, owner)()
|
||||
|
||||
|
||||
class multimethod:
|
||||
"""
|
||||
Acts like a classmethod when invoked from the class and like an
|
||||
instancemethod when invoked from the instance.
|
||||
"""
|
||||
|
||||
def __init__(self, func):
|
||||
self.func = func
|
||||
|
||||
def __get__(self, instance, owner):
|
||||
"""
|
||||
If called on an instance, pass the instance as the first
|
||||
argument.
|
||||
"""
|
||||
return (
|
||||
functools.partial(self.func, owner)
|
||||
if instance is None
|
||||
else functools.partial(self.func, owner, instance)
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue