Skip to content

Commit 7c60b86

Browse files
committed
-
1 parent f33f73f commit 7c60b86

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

source_py2/python_toolbox/monkeypatching_tools.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ def decorator(function):
5454
else:
5555
# `function` is probably some kind of descriptor.
5656
if not monkeypatchee_is_a_class:
57-
raise NotImplemented("I don't know how to monkeypatch a "
58-
"descriptor onto a non-class object.")
57+
raise NotImplementedError(
58+
"I don't know how to monkeypatch a descriptor onto a "
59+
"non-class object."
60+
)
5961
if not name:
6062
### Getting name of descriptor: ###############################
6163
# #
@@ -68,7 +70,7 @@ def decorator(function):
6870
elif isinstance(function, property):
6971
name_ = function.fget.__name__
7072
else:
71-
raise NotImplemented(
73+
raise NotImplementedError(
7274
"`monkeypatch_method` doesn't know how to get the "
7375
"name of this kind of function automatically, try "
7476
"manually."

source_py3/python_toolbox/monkeypatching_tools.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ def decorator(function):
5353
else:
5454
# `function` is probably some kind of descriptor.
5555
if not monkeypatchee_is_a_class:
56-
raise NotImplemented("I don't know how to monkeypatch a "
57-
"descriptor onto a non-class object.")
56+
raise NotImplementedError(
57+
"I don't know how to monkeypatch a descriptor onto a "
58+
"non-class object."
59+
)
5860
if not name:
5961
### Getting name of descriptor: ###############################
6062
# #
@@ -67,7 +69,7 @@ def decorator(function):
6769
elif isinstance(function, property):
6870
name_ = function.fget.__name__
6971
else:
70-
raise NotImplemented(
72+
raise NotImplementedError(
7173
"`monkeypatch_method` doesn't know how to get the "
7274
"name of this kind of function automatically, try "
7375
"manually."

0 commit comments

Comments
 (0)