@@ -20,34 +20,8 @@ class Extension(object):
20
20
# if a default is not set here.
21
21
config = {}
22
22
23
- def __init__ (self , * args , * *kwargs ):
23
+ def __init__ (self , ** kwargs ):
24
24
""" Initiate Extension and set up configs. """
25
-
26
- # check for configs arg for backward compat.
27
- # (there only ever used to be one so we use arg[0])
28
- if len (args ):
29
- if args [0 ] is not None :
30
- self .setConfigs (args [0 ])
31
- warnings .warn ('Extension classes accepting positional args is '
32
- 'pending Deprecation. Each setting should be '
33
- 'passed into the Class as a keyword. Positional '
34
- 'args are deprecated and will raise '
35
- 'an error in version 2.7. See the Release Notes for '
36
- 'Python-Markdown version 2.6 for more info.' ,
37
- DeprecationWarning )
38
- # check for configs kwarg for backward compat.
39
- if 'configs' in kwargs .keys ():
40
- if kwargs ['configs' ] is not None :
41
- self .setConfigs (kwargs .pop ('configs' , {}))
42
- warnings .warn ('Extension classes accepting a dict on the single '
43
- 'keyword "config" is pending Deprecation. Each '
44
- 'setting should be passed into the Class as a '
45
- 'keyword directly. The "config" keyword is '
46
- 'deprecated and raise an error in '
47
- 'version 2.7. See the Release Notes for '
48
- 'Python-Markdown version 2.6 for more info.' ,
49
- DeprecationWarning )
50
- # finally, use kwargs
51
25
self .setConfigs (kwargs )
52
26
53
27
def getConfig (self , key , default = '' ):
0 commit comments