diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-02-22 13:15:42 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-02-24 19:43:27 +0900 |
commit | 0dec09a0651a458ca5e3830d45f9e1ff1cb156f3 (patch) | |
tree | 8ce9be9573e468913c3e115609dfcc1de7238899 /sphinx/builders/html.py | |
parent | ce093636e9ca27db799d097c11d3bb44657ae955 (diff) | |
download | sphinx-git-0dec09a0651a458ca5e3830d45f9e1ff1cb156f3.tar.gz |
Update warning messages for script_files
Diffstat (limited to 'sphinx/builders/html.py')
-rw-r--r-- | sphinx/builders/html.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py index bb11bfb4a..2c5ebcd4d 100644 --- a/sphinx/builders/html.py +++ b/sphinx/builders/html.py @@ -109,24 +109,24 @@ class JSContainer(list): """The container for JavaScript scripts.""" def insert(self, index, obj): # type: (int, str) -> None - warnings.warn('builder.script_files is deprecated. ' - 'Please use app.add_js_file() instead.', - RemovedInSphinx30Warning, stacklevel=2) + warnings.warn('To modify script_files in the theme is deprecated. ' + 'Please insert a <script> tag directly in your theme instead.', + RemovedInSphinx30Warning, stacklevel=3) super().insert(index, obj) def extend(self, other): # type: ignore # type: (List[str]) -> None - warnings.warn('builder.script_files is deprecated. ' - 'Please use app.add_js_file() instead.', - RemovedInSphinx30Warning, stacklevel=2) + warnings.warn('To modify script_files in the theme is deprecated. ' + 'Please insert a <script> tag directly in your theme instead.', + RemovedInSphinx30Warning, stacklevel=3) for item in other: self.append(item) def __iadd__(self, other): # type: ignore # type: (List[str]) -> JSContainer - warnings.warn('builder.script_files is deprecated. ' - 'Please use app.add_js_file() instead.', - RemovedInSphinx30Warning, stacklevel=2) + warnings.warn('To modify script_files in the theme is deprecated. ' + 'Please insert a <script> tag directly in your theme instead.', + RemovedInSphinx30Warning, stacklevel=3) for item in other: self.append(item) return self |