Skip to content

Commit

Permalink
Add class name in method-not-implemented exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mortymacs committed Jul 10, 2021
1 parent 6670af5 commit fb8f1fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions abcmeta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ def __init_subclass__(cls):
# Make sure the derived class has implemented the abstract method.
if name not in cls.__dict__:
raise AttributeError(
"Derived class has not implemented '{}' method of the parent class.".format(
name
"Derived class '{}' has not implemented '{}' method of the"
" parent class '{}'.".format(
cls.__name__, name, cls.__base__.__name__
)
)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="abcmeta",
version="1.0.1",
version="1.0.2",
author="Morteza NourelahiAlamdari",
author_email="m@0t1.me",
description="Python meta class and abstract method library with restrictions.",
Expand Down

0 comments on commit fb8f1fd

Please sign in to comment.