Skip to content

Commit

Permalink
Use the class name from the self instance not the (non-existing) cls
Browse files Browse the repository at this point in the history
  • Loading branch information
tjguk authored and lordmauve committed Apr 25, 2019
1 parent 6bf9bf7 commit 0adf4ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pgzero/rect.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self, *args):
elif len(args) == 1:
self.x, self.y, self.w, self.h = args[0]
else:
raise TypeError("%s should be called with one, two or four arguments" % (cls.__name__))
raise TypeError("%s should be called with one, two or four arguments" % (self.__class__.__name__))

self.rect = self

Expand Down

0 comments on commit 0adf4ee

Please sign in to comment.