We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b1790e commit 813c467Copy full SHA for 813c467
src/compas/artists/artist.py
@@ -89,15 +89,15 @@ class Artist(object):
89
CONTEXT = None
90
ITEM_ARTIST = defaultdict(dict)
91
92
- def __new__(cls, *args, **kwargs):
+ def __new__(cls, item, **kwargs):
93
if not Artist.__ARTISTS_REGISTERED:
94
register_artists()
95
Artist.__ARTISTS_REGISTERED = True
96
97
- if not args or len(args) < 1 or args[0] is None:
+ if item is None:
98
raise ValueError('Cannot create an artist for `None`. Please ensure you pass a instance of a supported class.')
99
100
- cls = _get_artist_cls(args[0], **kwargs)
+ cls = _get_artist_cls(item, **kwargs)
101
PluginValidator.ensure_implementations(cls)
102
return super(Artist, cls).__new__(cls)
103
0 commit comments