mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Move deprecation warning
This commit is contained in:
parent
b3f596a133
commit
02ff0863c6
@ -96,19 +96,22 @@ class CSSContainer(list):
|
|||||||
the entry with Stylesheet class.
|
the entry with Stylesheet class.
|
||||||
"""
|
"""
|
||||||
def append(self, obj):
|
def append(self, obj):
|
||||||
warnings.warn('builder.css_files is deprecated. '
|
|
||||||
'Please use app.add_stylesheet() instead.',
|
|
||||||
RemovedInSphinx20Warning)
|
|
||||||
if isinstance(obj, Stylesheet):
|
if isinstance(obj, Stylesheet):
|
||||||
super(CSSContainer, self).append(obj)
|
super(CSSContainer, self).append(obj)
|
||||||
else:
|
else:
|
||||||
super(CSSContainer, self).append(Stylesheet(obj, None, 'stylesheet'))
|
super(CSSContainer, self).append(Stylesheet(obj, None, 'stylesheet'))
|
||||||
|
|
||||||
def extend(self, other):
|
def extend(self, other):
|
||||||
|
warnings.warn('builder.css_files is deprecated. '
|
||||||
|
'Please use app.add_stylesheet() instead.',
|
||||||
|
RemovedInSphinx20Warning)
|
||||||
for item in other:
|
for item in other:
|
||||||
self.append(item)
|
self.append(item)
|
||||||
|
|
||||||
def __iadd__(self, other):
|
def __iadd__(self, other):
|
||||||
|
warnings.warn('builder.css_files is deprecated. '
|
||||||
|
'Please use app.add_stylesheet() instead.',
|
||||||
|
RemovedInSphinx20Warning)
|
||||||
for item in other:
|
for item in other:
|
||||||
self.append(item)
|
self.append(item)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user