Skip to content

Commit 813c467

Browse files
committed
explicit position arg for Artist
1 parent 2b1790e commit 813c467

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/compas/artists/artist.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ class Artist(object):
8989
CONTEXT = None
9090
ITEM_ARTIST = defaultdict(dict)
9191

92-
def __new__(cls, *args, **kwargs):
92+
def __new__(cls, item, **kwargs):
9393
if not Artist.__ARTISTS_REGISTERED:
9494
register_artists()
9595
Artist.__ARTISTS_REGISTERED = True
9696

97-
if not args or len(args) < 1 or args[0] is None:
97+
if item is None:
9898
raise ValueError('Cannot create an artist for `None`. Please ensure you pass a instance of a supported class.')
9999

100-
cls = _get_artist_cls(args[0], **kwargs)
100+
cls = _get_artist_cls(item, **kwargs)
101101
PluginValidator.ensure_implementations(cls)
102102
return super(Artist, cls).__new__(cls)
103103

0 commit comments

Comments
 (0)