Skip to content

Commit fb8f1fd

Browse files
committed
Add class name in method-not-implemented exception
1 parent 6670af5 commit fb8f1fd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

abcmeta/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ def __init_subclass__(cls):
157157
# Make sure the derived class has implemented the abstract method.
158158
if name not in cls.__dict__:
159159
raise AttributeError(
160-
"Derived class has not implemented '{}' method of the parent class.".format(
161-
name
160+
"Derived class '{}' has not implemented '{}' method of the"
161+
" parent class '{}'.".format(
162+
cls.__name__, name, cls.__base__.__name__
162163
)
163164
)
164165

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="abcmeta",
8-
version="1.0.1",
8+
version="1.0.2",
99
author="Morteza NourelahiAlamdari",
1010
author_email="[email protected]",
1111
description="Python meta class and abstract method library with restrictions.",

0 commit comments

Comments
 (0)