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/codehilite.py | |
parent | 9ea3bdefbb62165c5c060852c60bfb5acd2574f1 (diff) | |
download | python-markdown-7637fb6c85ae753616046c1d4c9b23b56c8cdf57.tar.gz |
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/codehilite.py')
-rw-r--r-- | markdown/extensions/codehilite.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/markdown/extensions/codehilite.py b/markdown/extensions/codehilite.py index e30c7ba..fed4d64 100644 --- a/markdown/extensions/codehilite.py +++ b/markdown/extensions/codehilite.py @@ -227,7 +227,7 @@ class HiliteTreeprocessor(Treeprocessor): class CodeHiliteExtension(Extension): """ Add source code hilighting to markdown codeblocks. """ - def __init__(self, *args, **kwargs): + def __init__(self, **kwargs): # define default configs self.config = { 'linenums': [None, @@ -249,7 +249,7 @@ class CodeHiliteExtension(Extension): 'Default: True'] } - super(CodeHiliteExtension, self).__init__(*args, **kwargs) + super(CodeHiliteExtension, self).__init__(**kwargs) def extendMarkdown(self, md, md_globals): """ Add HilitePostprocessor to Markdown instance. """ @@ -260,5 +260,5 @@ class CodeHiliteExtension(Extension): md.registerExtension(self) -def makeExtension(*args, **kwargs): # pragma: no cover - return CodeHiliteExtension(*args, **kwargs) +def makeExtension(**kwargs): # pragma: no cover + return CodeHiliteExtension(**kwargs) |