Skip to content

Commit

Permalink
Fix typos found by codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Mar 27, 2023
1 parent 7144f49 commit 669bcc0
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
Expand Up @@ -2,7 +2,7 @@
* _sphinx_javascript_frameworks_compat.js
* ~~~~~~~~~~
*
* Compatability shim for jQuery and underscores.js.
* Compatibility shim for jQuery and underscores.js.
*
* WILL BE REMOVED IN Sphinx 6.0
* xref RemovedInSphinx60Warning
Expand Down
2 changes: 1 addition & 1 deletion doc/latex.rst
Expand Up @@ -144,7 +144,7 @@ Keys that you may want to override include:

.. hint::

After modifiying a core LaTeX key like this one, clean up the LaTeX
After modifying a core LaTeX key like this one, clean up the LaTeX
build repertory before next PDF build, else left-over auxiliary
files are likely to break the build.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -269,7 +269,7 @@ ignore = [
# pyupgrade
"UP031", # replace with format specifiers
]
external = [ # Whitelist for RUF100 unkown code warnings
external = [ # Whitelist for RUF100 unknown code warnings
"E704",
"W291",
"W293",
Expand Down
4 changes: 2 additions & 2 deletions sphinx/application.py
Expand Up @@ -970,7 +970,7 @@ def add_js_file(self, filename: str | None, priority: int = 500,
:param priority: Files are included in ascending order of priority. If
multiple JavaScript files have the same priority,
those files will be included in order of registration.
See list of "prority range for JavaScript files" below.
See list of "priority range for JavaScript files" below.
:param loading_method: The loading method for the JavaScript file.
Either ``'async'`` or ``'defer'`` are allowed.
:param kwargs: Extra keyword arguments are included as attributes of the
Expand Down Expand Up @@ -1035,7 +1035,7 @@ def add_css_file(self, filename: str, priority: int = 500, **kwargs: Any) -> Non
:param priority: Files are included in ascending order of priority. If
multiple CSS files have the same priority,
those files will be included in order of registration.
See list of "prority range for CSS files" below.
See list of "priority range for CSS files" below.
:param kwargs: Extra keyword arguments are included as attributes of the
``<link>`` tag.
Expand Down
2 changes: 1 addition & 1 deletion sphinx/builders/latex/constants.py
@@ -1,4 +1,4 @@
"""consntants for LaTeX builder."""
"""constants for LaTeX builder."""

from __future__ import annotations

Expand Down
2 changes: 1 addition & 1 deletion sphinx/domains/c.py
Expand Up @@ -98,7 +98,7 @@
_string_re = re.compile(r"[LuU8]?('([^'\\]*(?:\\.[^'\\]*)*)'"
r'|"([^"\\]*(?:\\.[^"\\]*)*)")', re.S)

# bool, complex, and imaginary are macro "keywords", so they are handled seperately
# bool, complex, and imaginary are macro "keywords", so they are handled separately
_simple_type_specifiers_re = re.compile(r"""
\b(
void|_Bool
Expand Down
2 changes: 1 addition & 1 deletion sphinx/domains/std.py
Expand Up @@ -980,7 +980,7 @@ def _resolve_term_xref(self, env: BuildEnvironment, fromdocname: str,
if result:
return result
else:
# fallback to case insentive match
# fallback to case insensitive match
if target.lower() in self._terms:
docname, labelid = self._terms[target.lower()]
return make_refnode(builder, fromdocname, docname, labelid, contnode)
Expand Down
2 changes: 1 addition & 1 deletion sphinx/ext/apidoc.py
Expand Up @@ -175,7 +175,7 @@ def is_skipped_package(dirname: str, opts: Any, excludes: list[str] = []) -> boo
files = glob.glob(path.join(dirname, '*.py'))
regular_package = any(f for f in files if is_initpy(f))
if not regular_package and not opts.implicit_namespaces:
# *dirname* is not both a regular package and an implicit namespace pacage
# *dirname* is not both a regular package and an implicit namespace package
return True

# Check there is some showable module inside package
Expand Down
2 changes: 1 addition & 1 deletion sphinx/ext/autodoc/__init__.py
Expand Up @@ -1477,7 +1477,7 @@ def import_object(self, raiseerror: bool = False) -> bool:

def _get_signature(self) -> tuple[Any | None, str | None, Signature | None]:
if inspect.isNewType(self.object) or isinstance(self.object, TypeVar):
# Supress signature
# Suppress signature
return None, None, None

def get_user_defined_function_or_method(obj: Any, attr: str) -> Any:
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinx.sty
Expand Up @@ -905,7 +905,7 @@ will be set to white}%
% than saving the box would-be parameters. Advantage is that this will not
% have to be modified if additional keys are added in future (e.g. for
% elliptic corners). Storing obeys TeX groups. (these details would be
% relevant only for some genuine independant LaTeX package and manual user
% relevant only for some genuine independent LaTeX package and manual user
% authored mark-up, not Sphinx auto mark-up).
\newcommand\sphinxboxsetup[1]{%
\setkeys{sphinxbox}{#1}%
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexobjects.sty
Expand Up @@ -119,7 +119,7 @@
\pysig@restore@itemsep@and@parskip
}
%
% Use a \parbox to accomodate long argument list in signatures
% Use a \parbox to accommodate long argument list in signatures
% LaTeX did not imagine that an \item label could need multi-line rendering
\newlength{\py@argswidth}
\newcommand{\py@sigparams}[2]{%
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexshadowbox.sty
Expand Up @@ -24,7 +24,7 @@
% color.

% At 6.2.0, \spx@ShadowFBox is so much simplified that it is now not
% separatedly defined but directly incorporated into the \FrameCommand
% separately defined but directly incorporated into the \FrameCommand
% definition done by sphinxShadowBox environment below.

% Use framed.sty \MakeFramed/\endMakeFramed to allow page breaks for topic
Expand Down
6 changes: 3 additions & 3 deletions sphinx/texinputs/sphinxpackageboxes.sty
Expand Up @@ -23,7 +23,7 @@
% pict2e. Actually since 6.0.0 the default is for code-blocks to use
% rounded boxes, and the only reason since then to wait "at begin document"
% was to check if user had reverted that default and in fact pict2e was not
% neeeded. But with \sphinxbox, we can not know for sure even in that case
% needed. But with \sphinxbox, we can not know for sure even in that case
% that pict2e is not needed. And even back then it would have been possible
% to user to try to employ \sphinxsetup via raw directive in document body
% and require some rounded corners (which was thus impossible to satisfy).
Expand All @@ -40,7 +40,7 @@
}%
% Formerly a \sphinxbuildwarning was issued but if we did that now it
% would mean that the produced PDF will always have a red banner near its
% end about pict2e not being avalable if indeed it is not available, even
% end about pict2e not being available if indeed it is not available, even
% if user has reverted the default and dropped rounded corners. Formerly
% the serious warning was done after having checked at begin document that
% indeed a rounded corner option had been used. As we drop the check now,
Expand Down Expand Up @@ -392,7 +392,7 @@
% needed which also contains the whole of pgf/TikZ... so this point
% is a bit moot...

% For code-blocks, attachements of caption and continuation hints are done
% For code-blocks, attachments of caption and continuation hints are done
% exactly as prior to extension of Sphinx via this package, whether the box
% has straight or rounded corners. The vertical space occupied is the same,
% if nothing else is changed (perhaps in future the title itself could be also
Expand Down
4 changes: 2 additions & 2 deletions tests/roots/test-directive-code/dedent.rst
Expand Up @@ -8,7 +8,7 @@ dedent option
Third line
Fourth line
ReST has no fixed indent and only a change in indention is significant not the amount [1]_.
ReST has no fixed indent and only a change in indentation is significant not the amount [1]_.
Thus, the following code inside the code block is not indent even it looks so with respect to the previous block.

.. code-block::
Expand Down Expand Up @@ -41,7 +41,7 @@ The code has 6 spaces indent, minus 4 spaces dedent should yield a 2 space inden
Dedenting by zero, should not strip any spaces and be a no-op.

.. note::
This can be used as an alternative to ``:class: dummy`` above, to fixate the ReST indention of the block.
This can be used as an alternative to ``:class: dummy`` above, to fixate the ReST indentation of the block.

.. code-block::
:dedent: 0
Expand Down
2 changes: 1 addition & 1 deletion tests/test_events.py
Expand Up @@ -11,7 +11,7 @@ def test_event_priority():
events = EventManager(object()) # pass an dummy object as an app
events.connect('builder-inited', lambda app: result.append(1), priority = 500)
events.connect('builder-inited', lambda app: result.append(2), priority = 500)
events.connect('builder-inited', lambda app: result.append(3), priority = 200) # eariler
events.connect('builder-inited', lambda app: result.append(3), priority = 200) # earlier
events.connect('builder-inited', lambda app: result.append(4), priority = 700) # later
events.connect('builder-inited', lambda app: result.append(5), priority = 500)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_intl.py
Expand Up @@ -596,7 +596,7 @@ def test_gettext_literalblock(app):
actual = read_po(app.outdir / 'literalblock.pot')
for expect_msg in [m for m in expect if m.id]:
if len(expect_msg.id.splitlines()) == 1:
# compare tranlsations only labels
# compare translations only labels
assert expect_msg.id in [m.id for m in actual if m.id]
else:
pass # skip code-blocks and literalblocks
Expand Down

0 comments on commit 669bcc0

Please sign in to comment.