diff options
author | Waylan Limberg <waylan.limberg@icloud.com> | 2018-01-13 16:13:07 -0500 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2018-01-13 16:18:41 -0500 |
commit | 7637fb6c85ae753616046c1d4c9b23b56c8cdf57 (patch) | |
tree | 7774ea7c12ef8e9f8e4a1bf8d3d4377a7679226d /markdown/extensions/footnotes.py | |
parent | 9ea3bdefbb62165c5c060852c60bfb5acd2574f1 (diff) | |
download | markdown-7637fb6c85ae753616046c1d4c9b23b56c8cdf57.tar.gz markdown-7637fb6c85ae753616046c1d4c9b23b56c8cdf57.tar.bz2 markdown-7637fb6c85ae753616046c1d4c9b23b56c8cdf57.zip |
Remove deprecated support for Extension args.
In the past Markdown used to pass extension config settings to the
Extension class via a positional argument named `config`. That was
deprecated in 2.6 in favor of using keyword arguments (`**kwargs`).
Support has been completely dropped. Only keyword arguments are
accepted.
Diffstat (limited to 'markdown/extensions/footnotes.py')
-rw-r--r-- | markdown/extensions/footnotes.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/markdown/extensions/footnotes.py b/markdown/extensions/footnotes.py index 6ac92ab..d16cf84 100644 --- a/markdown/extensions/footnotes.py +++ b/markdown/extensions/footnotes.py @@ -35,7 +35,7 @@ RE_REF_ID = re.compile(r'(fnref)(\d+)') class FootnoteExtension(Extension): """ Footnote Extension. """ - def __init__(self, *args, **kwargs): + def __init__(self, **kwargs): """ Setup configs. """ self.config = { @@ -56,7 +56,7 @@ class FootnoteExtension(Extension): "of the backlink. %d will be replaced by the " "footnote number."] } - super(FootnoteExtension, self).__init__(*args, **kwargs) + super(FootnoteExtension, self).__init__(**kwargs) # In multiple invocations, emit links that don't get tangled. self.unique_prefix = 0 @@ -426,6 +426,6 @@ class FootnotePostprocessor(Postprocessor): return text.replace(NBSP_PLACEHOLDER, " ") -def makeExtension(*args, **kwargs): # pragma: no cover +def makeExtension(**kwargs): # pragma: no cover """ Return an instance of the FootnoteExtension """ - return FootnoteExtension(*args, **kwargs) + return FootnoteExtension(**kwargs) |