Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report / Question / Feature
about: Anything related to IPython itsel
about: Anything related to IPython itself
title: ''
labels: ''
assignees: ''
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Codespell configuration is within pyproject.toml
---
name: Codespell

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
Comment on lines +20 to +21
- name: Codespell
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install latex
if: runner.os == 'Linux' && matrix.deps == 'test_extra'
run: echo "disable latex for now, issues in mirros" #sudo apt-get -yq -o Acquire::Retries=3 --no-install-suggests --no-install-recommends install texlive dvipng
run: echo "disable latex for now, issues in mirrors" #sudo apt-get -yq -o Acquire::Retries=3 --no-install-suggests --no-install-recommends install texlive dvipng
- name: Install and update Python dependencies (binary only)
if: ${{ ! contains( matrix.python-version, 'dev' ) }}
run: |
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ repos:
- id: darker
args: [--formatter=ruff]
additional_dependencies: [ruff, isort, mypy, flake8]

- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in pyproject.toml
rev: v2.4.3
hooks:
- id: codespell
additional_dependencies:
- tomli; python_version<'3.11'
4 changes: 2 additions & 2 deletions IPython/core/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def format_stack_entry(
bp,
(Token.LinenoEm, num),
(Token, " "),
# TODO: investigate Toke.Line here, likely LineEm,
# TODO: investigate Token.Line here, likely LineEm,
# Token is problematic here as line is already colored, a
# and this changes the full style of the colored line.
# ideally, __line_content returns the token and we modify the style.
Expand All @@ -792,7 +792,7 @@ def format_stack_entry(
bp,
(Token.Lineno, num),
(Token, " "),
# TODO: investigate Toke.Line here, likely Line
# TODO: investigate Token.Line here, likely Line
# Token is problematic here as line is already colored, a
# and this changes the full style of the colored line.
# ideally, __line_content returns the token and we modify the style.
Expand Down
2 changes: 1 addition & 1 deletion IPython/core/doctb.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def structured_traceback(
return structured_traceback_parts

def debugger(self, force: bool = False) -> None:
raise RuntimeError("canot rundebugger in Docs mode")
raise RuntimeError("cannot rundebugger in Docs mode")

def handler(self, info: tuple[Any, Any, Any] | None = None) -> None:
(etype, evalue, etb) = info or sys.exc_info()
Expand Down
2 changes: 1 addition & 1 deletion IPython/core/guarded_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ def eval_node(node: ast.AST | None, context: EvaluationContext):
decorator = eval_node(decorator_node, context)
except NameError:
# if the decorator is not yet defined this is fine
# especialy because we don't handle imports yet
# especially because we don't handle imports yet
continue
if decorator is property:
is_property = True
Expand Down
2 changes: 1 addition & 1 deletion IPython/core/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ def writeout_cache(self, conn: sqlite3.Connection | None = None) -> None:
@contextmanager
def hold(ref: ReferenceType[HistoryManager]) -> Iterator[ReferenceType[HistoryManager]]:
"""
Context manger that hold a reference to a weak ref to make sure it
Context manager that hold a reference to a weak ref to make sure it
is not GC'd during it's context.
"""
r = ref()
Expand Down
2 changes: 1 addition & 1 deletion IPython/external/pickleshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class PickleShareDB(collections_abc.MutableMapping):
"""The main 'connection' object for PickleShare database"""

def __init__(self, root):
"""Return a db object that will manage the specied directory"""
"""Return a db object that will manage the specified directory"""
if not isinstance(root, str):
root = str(root)
root = os.path.abspath(os.path.expanduser(root))
Expand Down
2 changes: 1 addition & 1 deletion IPython/terminal/interactiveshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def _highlighting_style_changed(self, change):
assert change.new == change.new.lower()
if change.new != "legacy":
warn(
"highlighting_style is deprecated since 9.0 and have no effect, use themeing."
"highlighting_style is deprecated since 9.0 and have no effect, use theming."
)
return

Expand Down
2 changes: 1 addition & 1 deletion IPython/terminal/shortcuts/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def __call__(self):

pass_through = PassThrough()

# these one is callable and re-used multiple times hence needs to be
# these one is callable and reused multiple times hence needs to be
# only defined once beforehand so that transforming back to human-readable
# names works well in the documentation.
default_buffer_focused = has_focus(DEFAULT_BUFFER)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/development/wrapperkernels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Making simple Python wrapper kernels

.. versionadded:: 3.0

You can now re-use the kernel machinery in IPython to easily make new kernels.
You can now reuse the kernel machinery in IPython to easily make new kernels.
This is useful for languages that have Python bindings, such as `Octave
<https://www.gnu.org/software/octave/>`_ (via
`Oct2Py <https://oct2py.readthedocs.io/>`_), or languages
Expand Down
28 changes: 26 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ disallow_untyped_decorators = false
ignore_errors = false
ignore_missing_imports = true

# gloabl ignore error
# global ignore error
[[tool.mypy.overrides]]
module = [
"IPython",
Expand Down Expand Up @@ -489,7 +489,7 @@ ignore = [
"UP032", # 90 f-strings
"C408", # 33 unnecessary collection call
"SIM201", # 27 collapsible IF
"PLC0414", # WRONG CONFLICT WITH EXPLICT REEXPORT
"PLC0414", # WRONG CONFLICT WITH EXPLICIT REEXPORT
"E713", # 1 Test for membership should be `not in`
"F601", # 3 Dictionary key literal `True` repeated (`True` hashes to the same value as `1`)
"E702", # 3 Multiple statements on one line (semicolon)
Expand Down Expand Up @@ -583,3 +583,27 @@ extend-exclude = ["tests"]
[tool.black]
# moved here from setup.cfg, where it had been in (ignored) INI syntax
exclude = 'timing\.py'

[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git,.git-meta,.gitignore,.gitattributes,*.svg,*.css,./docs/source/whatsnew/*'
check-hidden = true
# Protect URLs from being "corrected" (e.g. typos in upstream URLs should not be changed)
ignore-regex = 'https?://\S+'
# Variable names, magic commands, and domain-specific terms that look like typos:
# ans - variable abbreviation for "answer"
# strng - variable abbreviation for "string" (legacy parameter name throughout codebase)
# whos - IPython %whos magic command (not "whose")
# crasher - function name meaning "a callable that raises an exception"
# defaulty - parameter name for y-coordinate default (defaultx, defaulty in terminal.py)
# dne - variable abbreviation for "does not exist"
# abd,fo,te,whe - test fixture strings used for completion/formatting tests
# notin - ast.NotIn (Python AST node; appears as NotIn in comments and code)
# matchin - variable name for "match input" in sphinxext/ipython_directive.py
# promptin - attribute name for "prompt in" in sphinxext/ipython_directive.py
# buss - contributor name: Gerrit Buss
# tham - contributor name: Ivan Tham
# oktober - German "Oktober" in quoted email header (interactiveshell.py)
# mis - (mis)type parenthetical in docs (not a standalone word)
# reenable - valid non-hyphenated form (vs re-enable) in historical commit titles
ignore-words-list = 'ans,strng,whos,crasher,defaulty,dne,abd,fo,te,whe,notin,matchin,promptin,buss,tham,oktober,mis,reenable'
2 changes: 1 addition & 1 deletion tests/test_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ def test_line_magics_with_code_argument_shadowing():
# shadow
ip.run_cell("timeit = 1")

# should not suggest on implict magic when shadowed
# should not suggest on implicit magic when shadowed
text, matches = c.complete("timeit -n 2 -r 1 flo")
assert matches == []

Expand Down
2 changes: 1 addition & 1 deletion tests/test_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ def edit(self, line):
# `%load` comes from the same class as the core `%edit`.
mm.load_lazy("load")
assert mm.find("line", "edit").__self__.__class__ is OverridingMagics
# Neither does re-declaring the core one shadow it.
# Neither does redeclaring the core one shadow it.
mm.register_lazy("edit", "IPython.core.magics.code:CodeMagics", "line")
assert mm.find("line", "edit").__self__.__class__ is OverridingMagics
mm.load_all_lazy_magics()
Expand Down
2 changes: 1 addition & 1 deletion tools/release_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ python -c 'import sphinx'
python -c 'import sphinx_rtd_theme'
python -c 'import pytest'
python -c 'import build'
# those are necessary fo building the docs
# those are necessary for building the docs
echo "Checking imports for docs"
python -c 'import numpy'
python -c 'import matplotlib'
Expand Down
Loading