diff options
author | Daniel Eades <danieleades@hotmail.com> | 2022-12-15 17:22:07 +0000 |
---|---|---|
committer | Jean-François B <2589111+jfbu@users.noreply.github.com> | 2022-12-16 16:50:24 +0100 |
commit | 1abb24e309c8189eca2663f77c3a3aa866633e12 (patch) | |
tree | e74425a4c2647b8a5c6c7c980f00235fc12491b5 /sphinx/writers | |
parent | dc29bf9abef764460ec5ec1c1571bddce9a4f7fa (diff) | |
download | sphinx-git-1abb24e309c8189eca2663f77c3a3aa866633e12.tar.gz |
remove blanket 'noqas'
Diffstat (limited to 'sphinx/writers')
-rw-r--r-- | sphinx/writers/html.py | 6 | ||||
-rw-r--r-- | sphinx/writers/html5.py | 6 | ||||
-rw-r--r-- | sphinx/writers/latex.py | 2 | ||||
-rw-r--r-- | sphinx/writers/texinfo.py | 4 |
4 files changed, 12 insertions, 6 deletions
diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py index 36b066158..938b6e77b 100644 --- a/sphinx/writers/html.py +++ b/sphinx/writers/html.py @@ -627,8 +627,10 @@ class HTMLTranslator(SphinxTranslator, BaseTranslator): if not ('width' in node and 'height' in node): size = get_image_size(os.path.join(self.builder.srcdir, olduri)) if size is None: - logger.warning(__('Could not obtain image size. :scale: option is ignored.'), # NOQA - location=node) + logger.warning( + __('Could not obtain image size. :scale: option is ignored.'), + location=node, + ) else: if 'width' not in node: node['width'] = str(size[0]) diff --git a/sphinx/writers/html5.py b/sphinx/writers/html5.py index f8b22de27..6fe9b62fd 100644 --- a/sphinx/writers/html5.py +++ b/sphinx/writers/html5.py @@ -574,8 +574,10 @@ class HTML5Translator(SphinxTranslator, BaseTranslator): if not ('width' in node and 'height' in node): size = get_image_size(os.path.join(self.builder.srcdir, olduri)) if size is None: - logger.warning(__('Could not obtain image size. :scale: option is ignored.'), # NOQA - location=node) + logger.warning( + __('Could not obtain image size. :scale: option is ignored.'), + location=node, + ) else: if 'width' not in node: node['width'] = str(size[0]) diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index e3011adf8..7bdde2166 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -2108,6 +2108,6 @@ class LaTeXTranslator(SphinxTranslator): # FIXME: Workaround to avoid circular import # refs: https://github.com/sphinx-doc/sphinx/issues/5433 -from sphinx.builders.latex.nodes import ( # NOQA isort:skip +from sphinx.builders.latex.nodes import ( # noqa: E402 # isort:skip HYPERLINK_SUPPORT_NODES, captioned_literal_block, footnotetext, ) diff --git a/sphinx/writers/texinfo.py b/sphinx/writers/texinfo.py index aeb8e8f63..cbac28a2f 100644 --- a/sphinx/writers/texinfo.py +++ b/sphinx/writers/texinfo.py @@ -490,7 +490,9 @@ class TexinfoTranslator(SphinxTranslator): # this is copied from the latex writer # TODO: move this to sphinx.util - def collect_footnotes(self, node: Element) -> Dict[str, List[Union[collected_footnote, bool]]]: # NOQA + def collect_footnotes( + self, node: Element + ) -> Dict[str, List[Union[collected_footnote, bool]]]: def footnotes_under(n: Element) -> Iterator[nodes.footnote]: if isinstance(n, nodes.footnote): yield n |