Skip to content

Commit f9c8943

Browse files
Use # NoQA consistently (sphinx-doc#11903)
Co-authored-by: Adam Turner <[email protected]>
1 parent 95b2cce commit f9c8943

File tree

24 files changed

+33
-33
lines changed

24 files changed

+33
-33
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189

190190
# -- Extension interface -------------------------------------------------------
191191

192-
from sphinx import addnodes # noqa: E402
192+
from sphinx import addnodes # NoQA: E402
193193

194194
event_sig_re = re.compile(r'([a-zA-Z-]+)\s*\((.*)\)')
195195

sphinx/builders/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
from sphinx.util.parallel import ParallelTasks, SerialTasks, make_chunks, parallel_available
2626

2727
# side effect: registers roles and directives
28-
from sphinx import directives # noqa: F401 isort:skip
29-
from sphinx import roles # noqa: F401 isort:skip
28+
from sphinx import directives # NoQA: F401 isort:skip
29+
from sphinx import roles # NoQA: F401 isort:skip
3030

3131
if TYPE_CHECKING:
3232
from collections.abc import Iterable, Sequence

sphinx/builders/html/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ def setup(app: Sphinx) -> dict[str, Any]:
13381338
app.add_config_value('html_search_scorer', '', '')
13391339
app.add_config_value('html_scaled_image_link', True, 'html')
13401340
app.add_config_value('html_baseurl', '', 'html')
1341-
app.add_config_value('html_codeblock_linenos_style', 'inline', 'html', # RemovedInSphinx70Warning # noqa: E501
1341+
app.add_config_value('html_codeblock_linenos_style', 'inline', 'html', # RemovedInSphinx70Warning # NoQA: E501
13421342
ENUM('table', 'inline'))
13431343
app.add_config_value('html_math_renderer', None, 'env')
13441344
app.add_config_value('html4_writer', False, 'html')

sphinx/builders/latex/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from docutils.frontend import OptionParser
1111

12-
import sphinx.builders.latex.nodes # noqa: F401,E501 # Workaround: import this before writer to avoid ImportError
12+
import sphinx.builders.latex.nodes # NoQA: F401,E501 # Workaround: import this before writer to avoid ImportError
1313
from sphinx import addnodes, highlighting, package_dir
1414
from sphinx.builders import Builder
1515
from sphinx.builders.latex.constants import ADDITIONAL_SETTINGS, DEFAULT_SETTINGS, SHORTHANDOFF

sphinx/builders/linkcheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def _check_uri(self, uri: str, hyperlink: Hyperlink) -> tuple[str, str, int]:
408408
req_url = encode_uri(req_url)
409409

410410
# Get auth info, if any
411-
for pattern, auth_info in self.auth: # noqa: B007 (false positive)
411+
for pattern, auth_info in self.auth: # NoQA: B007 (false positive)
412412
if pattern.match(uri):
413413
break
414414
else:

sphinx/cmd/quickstart.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ def ask_user(d: dict[str, Any]) -> None:
245245

246246
if 'dot' not in d:
247247
print()
248-
print(__('Inside the root directory, two more directories will be created; "_templates"\n' # noqa: E501
249-
'for custom HTML templates and "_static" for custom stylesheets and other static\n' # noqa: E501
250-
'files. You can enter another prefix (such as ".") to replace the underscore.')) # noqa: E501
248+
print(__('Inside the root directory, two more directories will be created; "_templates"\n' # NoQA: E501
249+
'for custom HTML templates and "_static" for custom stylesheets and other static\n' # NoQA: E501
250+
'files. You can enter another prefix (such as ".") to replace the underscore.')) # NoQA: E501
251251
d['dot'] = do_prompt(__('Name prefix for templates and static dir'), '_', ok)
252252

253253
if 'project' not in d:

sphinx/directives/other.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from docutils.statemachine import StateMachine
1414

1515
from sphinx import addnodes
16-
from sphinx.domains.changeset import VersionChange # noqa: F401 # for compatibility
16+
from sphinx.domains.changeset import VersionChange # NoQA: F401 # for compatibility
1717
from sphinx.domains.std import StandardDomain
1818
from sphinx.locale import _, __
1919
from sphinx.util import docname_join, logging, url_re

sphinx/domains/c/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ class CDomain(Domain):
627627
'enumerator': ObjType(_('enumerator'), 'enumerator', 'identifier'),
628628
'type': ObjType(_('type'), 'identifier', 'type'),
629629
# generated object types
630-
'functionParam': ObjType(_('function parameter'), 'identifier', 'var', 'member', 'data'), # noqa: E501
630+
'functionParam': ObjType(_('function parameter'), 'identifier', 'var', 'member', 'data'), # NoQA: E501
631631
}
632632

633633
directives = {

sphinx/domains/cpp/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,9 +758,9 @@ class CPPDomain(Domain):
758758
'enum': ObjType(_('enum'), 'enum', 'identifier', 'type'),
759759
'enumerator': ObjType(_('enumerator'), 'enumerator', 'identifier'),
760760
# generated object types
761-
'functionParam': ObjType(_('function parameter'), 'identifier', 'member', 'var'), # noqa: E501
761+
'functionParam': ObjType(_('function parameter'), 'identifier', 'member', 'var'), # NoQA: E501
762762
'templateParam': ObjType(_('template parameter'),
763-
'identifier', 'class', 'struct', 'union', 'member', 'var', 'type'), # noqa: E501
763+
'identifier', 'class', 'struct', 'union', 'member', 'var', 'type'), # NoQA: E501
764764
}
765765

766766
directives = {

sphinx/environment/collectors/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def process_doc(self, app: Sphinx, doctree: nodes.document) -> None:
4646
md[field_name.astext()] = field_body.astext()
4747
elif isinstance(node, nodes.TextElement):
4848
# other children must be TextElement
49-
# see: https://docutils.sourceforge.io/docs/ref/doctree.html#bibliographic-elements # noqa: E501
49+
# see: https://docutils.sourceforge.io/docs/ref/doctree.html#bibliographic-elements # NoQA: E501
5050
md[node.__class__.__name__] = node.astext()
5151

5252
for name, value in md.items():

0 commit comments

Comments
 (0)