Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos, add typos CI #658

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ jobs:
pipx install ruff
ruff check

typos:
name: Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master

pylint:
name: Pylint
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion doc/shells.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ PuDB supports the following external shells.
- Internal (same as pressing ``Ctrl-x``). This is the default.
- Classic (similar to the default ``python`` interactive shell)
- `IPython <https://ipython.org/>`_
The `IPython` shell can also be used in a server-client fasion, which is
The `IPython` shell can also be used in a server-client fashion, which is
enabled by selecting the shell `ipython_kernel` in the settings. When set,
the ``!`` key will start an `IPython` kernel and wait for connection from,
e.g., `qtconsole`. Like other shells, `ipython_kernel` blocks the debugger
Expand Down
2 changes: 1 addition & 1 deletion examples/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def pudb_shell(_globals, _locals):
# Many shells only let you pass in a single locals dictionary, rather than
# separate globals and locals dictionaries. In this case, you can use
# pudb.shell.SetPropagatingDict to automatically merge the two into a
# single dictionary. It does this in such a way that assignments propogate
# single dictionary. It does this in such a way that assignments propagate
# to _locals, so that when the debugger is at the module level, variables
# can be reassigned in the shell.
from pudb.shell import SetPropagatingDict
Expand Down
2 changes: 1 addition & 1 deletion examples/stringifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
cannot fail. PuDB also includes built-in options for using str() and repr().

Note that str() and repr() will be slower than type(), which is especially
noticable when you have many variables, or some of your variables have very
noticeable when you have many variables, or some of your variables have very
large string/repr representations.

Also note that if you just want to change the type for one or two variables,
Expand Down
4 changes: 2 additions & 2 deletions pudb/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2828,7 +2828,7 @@ def event_loop(self, toplevel=None):
"- Size changes in sidebar boxes (contributed by Aaron Meurer)\n"
"- New theme 'midnight' (contributed by Aaron Meurer)\n"
"- Support for IPython 0.11 (contributed by Chris Farrow)\n"
"- Suport for custom stringifiers "
"- Support for custom stringifiers "
"(contributed by Aaron Meurer)\n"
"- Line wrapping in variables view "
"(contributed by Aaron Meurer)\n"
Expand Down Expand Up @@ -2951,7 +2951,7 @@ def update_var_view(self, locals=None, globals=None, focus_index=None):
locals, globals)
if focus_index is not None:
# Have to set the focus _after_ updating the locals list, as there
# appears to be a brief moment while reseting the list when the
# appears to be a brief moment while resetting the list when the
# list is empty but urwid will attempt to set the focus anyway,
# which causes problems.
try:
Expand Down
2 changes: 1 addition & 1 deletion pudb/lowlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def lookup_module(filename):
def detect_encoding(line_iter):
"""
The detect_encoding() function is used to detect the encoding that should
be used to decode a Python source file. It requires one argment, line_iter,
be used to decode a Python source file. It requires one argument, line_iter,
an iterator on the lines to be read.

It will read a maximum of two lines, and return the encoding used
Expand Down
2 changes: 1 addition & 1 deletion pudb/test/test_lowlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def main():
conf = ''. \\
replace('', '')

conf_tpl = '' # <-- imposible to set breakpoint here
conf_tpl = '' # <-- impossible to set breakpoint here

main()
"""
Expand Down
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,17 @@ addopts = [
"--ignore=pudb/b.py",
"--ignore=pudb/ipython.py",
]


[tool.typos.default]
extend-ignore-re = [
"(?Rm)^.*(#|//)\\s*spellchecker:\\s*disable-line$"
]

[tool.typos.default.extend-words]
# Ned Batchelder, person
Ned = "Ned"

[tool.typos.files]
extend-exclude = [
]