mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
removed unused CustomNone
This commit is contained in:
parent
15c03de485
commit
0096705347
2 changed files with 0 additions and 40 deletions
|
|
@ -25,7 +25,6 @@ from .lib_old import (
|
|||
get_version_from_path,
|
||||
get_last_version_from_path,
|
||||
get_subsets,
|
||||
CustomNone,
|
||||
get_linked_assets,
|
||||
map_subsets_by_family,
|
||||
BuildWorkfile,
|
||||
|
|
|
|||
|
|
@ -618,45 +618,6 @@ def get_subsets(asset_name,
|
|||
return output_dict
|
||||
|
||||
|
||||
class CustomNone:
|
||||
"""Created object can be used as custom None (not equal to None).
|
||||
|
||||
WARNING: Multiple created objects are not equal either.
|
||||
Exmple:
|
||||
>>> a = CustomNone()
|
||||
>>> a == None
|
||||
False
|
||||
>>> b = CustomNone()
|
||||
>>> a == b
|
||||
False
|
||||
>>> a == a
|
||||
True
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""Create uuid as identifier for custom None."""
|
||||
self.identifier = str(uuid.uuid4())
|
||||
|
||||
def __bool__(self):
|
||||
"""Return False (like default None)."""
|
||||
return False
|
||||
|
||||
def __eq__(self, other):
|
||||
"""Equality is compared by identifier value."""
|
||||
if type(other) == type(self):
|
||||
if other.identifier == self.identifier:
|
||||
return True
|
||||
return False
|
||||
|
||||
def __str__(self):
|
||||
"""Return value of identifier when converted to string."""
|
||||
return self.identifier
|
||||
|
||||
def __repr__(self):
|
||||
"""Representation of custom None."""
|
||||
return "<CustomNone-{}>".format(str(self.identifier))
|
||||
|
||||
|
||||
def get_linked_assets(asset_entity):
|
||||
"""Return linked assets for `asset_entity`."""
|
||||
inputs = asset_entity["data"].get("inputs", [])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue