Skip to content

Commit 8e2b701

Browse files
committed
Remove unused _SnippetManager kwargs support
1 parent 4ffd3db commit 8e2b701

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

proplot/internals/docstring.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,17 @@ class _SnippetManager(dict):
111111
"""
112112
A simple database for handling documentation snippets.
113113
"""
114-
def __call__(self, obj, **kwargs):
114+
def __call__(self, obj):
115115
"""
116-
Add snippets to the string or object using ``%(name)s`` substitution. Use
117-
`kwargs` to format the snippets themselves with ``%(name)s`` substitution.
116+
Add snippets to the string or object using ``%(name)s`` substitution. Here
117+
``%(name)s`` is used rather than ``.format`` to support invalid identifiers.
118118
"""
119119
if isinstance(obj, str):
120120
obj %= self # add snippets to a string
121-
obj %= kwargs
122121
else:
123122
obj.__doc__ = inspect.getdoc(obj) # also dedents the docstring
124123
if obj.__doc__:
125124
obj.__doc__ %= self # insert snippets after dedent
126-
obj.__doc__ %= kwargs
127125
return obj
128126

129127
def __setitem__(self, key, value):

0 commit comments

Comments
 (0)