mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 13:11:15 -07:00
Update cherrypy==18.9.0
This commit is contained in:
parent
2fc618c01f
commit
51196a7fb1
137 changed files with 44442 additions and 11582 deletions
19
lib/inflect/compat/pydantic.py
Normal file
19
lib/inflect/compat/pydantic.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
class ValidateCallWrapperWrapper:
|
||||
def __init__(self, wrapped):
|
||||
self.orig = wrapped
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.raw_function == other.raw_function
|
||||
|
||||
@property
|
||||
def raw_function(self):
|
||||
return getattr(self.orig, 'raw_function') or self.orig
|
||||
|
||||
|
||||
def same_method(m1, m2) -> bool:
|
||||
"""
|
||||
Return whether m1 and m2 are the same method.
|
||||
|
||||
Workaround for pydantic/pydantic#6390.
|
||||
"""
|
||||
return ValidateCallWrapperWrapper(m1) == ValidateCallWrapperWrapper(m2)
|
Loading…
Add table
Add a link
Reference in a new issue