diff --git a/IPython/core/completer.py b/IPython/core/completer.py index 440953d..e3351ed 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -159,7 +159,7 @@ By default results from all matchers are combined, in the order determined by their priority. Matchers can request to suppress results from subsequent matchers by setting ``suppress`` to ``True`` in the ``MatcherResult``. -When multiple matchers simultaneously request surpression, the results from of +When multiple matchers simultaneously request suppression, the results from of the matcher with higher priority will be returned. Sometimes it is desirable to suppress most but not all other matchers; @@ -2651,7 +2651,7 @@ class IPCompleter(Completer): ) can_close_quote = can_close_quote and self.auto_close_dict_keys - # fast path if closing qoute should be appended but not suffix is allowed + # fast path if closing quote should be appended but not suffix is allowed if not can_close_quote and not can_close_bracket and closing_quote: return [leading + k for k in matches] diff --git a/IPython/core/completerlib.py b/IPython/core/completerlib.py index 5ce97ab..f15490f 100644 --- a/IPython/core/completerlib.py +++ b/IPython/core/completerlib.py @@ -167,7 +167,7 @@ def is_possible_submodule(module, attr): try: obj = getattr(module, attr) except AttributeError: - # Is possilby an unimported submodule + # Is possibly an unimported submodule return True except TypeError: # https://github.com/ipython/ipython/issues/9678 diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index 937b6e8..1f0d7b2 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -19,7 +19,7 @@ Global Configuration -------------------- The IPython debugger will by read the global ``~/.pdbrc`` file. -That is to say you can list all comands supported by ipdb in your `~/.pdbrc` +That is to say you can list all commands supported by ipdb in your `~/.pdbrc` configuration file, to globally configure pdb. Example:: @@ -177,7 +177,7 @@ def BdbQuit_excepthook(et, ev, tb, excepthook=None): parameter. """ raise ValueError( - "`BdbQuit_excepthook` is deprecated since version 5.1. It is still arround only because it is still imported by ipdb.", + "`BdbQuit_excepthook` is deprecated since version 5.1. It is still around only because it is still imported by ipdb.", ) diff --git a/IPython/core/guarded_eval.py b/IPython/core/guarded_eval.py index d8ac992..39fe853 100644 --- a/IPython/core/guarded_eval.py +++ b/IPython/core/guarded_eval.py @@ -132,7 +132,7 @@ def _get_external(module_name: str, access_path: Sequence[str]): Raises: * `KeyError` if module is removed not found, and - * `AttributeError` if acess path does not match an exported object + * `AttributeError` if access path does not match an exported object """ member_type = sys.modules[module_name] for attr in access_path: @@ -235,7 +235,7 @@ class SelectivePolicy(EvaluationPolicy): accept = has_original_attr and has_original_attribute if accept: - # We still need to check for overriden properties. + # We still need to check for overridden properties. value_class = type(value) if not hasattr(value_class, attr): @@ -332,7 +332,7 @@ class EvaluationContext(NamedTuple): evaluation: Literal[ "forbidden", "minimal", "limited", "unsafe", "dangerous" ] = "forbidden" - #: Whether the evalution of code takes place inside of a subscript. + #: Whether the evaluation of code takes place inside of a subscript. #: Useful for evaluating ``:-1, 'col'`` in ``df[:-1, 'col']``. in_subscript: bool = False @@ -373,7 +373,7 @@ def guarded_eval(code: str, context: EvaluationContext): # getitem at all, for example it fails on simple `[0][1]` if context.in_subscript: - # syntatic sugar for ellipsis (:) is only available in susbcripts + # syntactic sugar for ellipsis (:) is only available in subscripts # so we need to trick the ast parser into thinking that we have # a subscript, but we need to be able to later recognise that we did # it so we can ignore the actual __getitem__ operation diff --git a/IPython/core/inputsplitter.py b/IPython/core/inputsplitter.py index af7a12e..092f214 100644 --- a/IPython/core/inputsplitter.py +++ b/IPython/core/inputsplitter.py @@ -97,7 +97,7 @@ def num_ini_spaces(s): """ warnings.warn( "`num_ini_spaces` is Pending Deprecation since IPython 8.17." - "It is considered fro removal in in future version. " + "It is considered for removal in in future version. " "Please open an issue if you believe it should be kept.", stacklevel=2, category=PendingDeprecationWarning, diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index d05cb45..07fb807 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -1627,7 +1627,7 @@ class InteractiveShell(SingletonConfigurable): Returns ------- parts_ok: bool - wether we were properly able to parse parts. + whether we were properly able to parse parts. parts: list of str extracted parts diff --git a/IPython/core/magics/ast_mod.py b/IPython/core/magics/ast_mod.py index fa54791..dc3c5bc 100644 --- a/IPython/core/magics/ast_mod.py +++ b/IPython/core/magics/ast_mod.py @@ -5,7 +5,7 @@ with ast-transformers it is not easy to directly manipulate ast. IPython has pre-code and post-code hooks, but are ran from within the IPython -machinery so may be inappropriate, for example for performance mesurement. +machinery so may be inappropriate, for example for performance measurement. This module give you tools to simplify this, and expose 2 classes: diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index 8aa8429..a4fdc28 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -460,7 +460,7 @@ class Inspector(Colorable): mime_hooks = traitlets.Dict( config=True, - help="dictionary of mime to callable to add informations into help mimebundle dict", + help="dictionary of mime to callable to add information into help mimebundle dict", ).tag(config=True) def __init__( diff --git a/IPython/core/pylabtools.py b/IPython/core/pylabtools.py index 5c926a9..ad2fc74 100644 --- a/IPython/core/pylabtools.py +++ b/IPython/core/pylabtools.py @@ -528,7 +528,7 @@ def _list_matplotlib_backends_and_gui_loops() -> list[str]: # Matplotlib and IPython do not always use the same gui framework name. -# Always use the approprate one of these conversion functions when passing a +# Always use the appropriate one of these conversion functions when passing a # gui framework name to/from Matplotlib. def _convert_gui_to_matplotlib(gui: str | None) -> str | None: if gui and gui.lower() == "osx": diff --git a/IPython/core/tests/test_completer.py b/IPython/core/tests/test_completer.py index e20d9b8..fe078f9 100644 --- a/IPython/core/tests/test_completer.py +++ b/IPython/core/tests/test_completer.py @@ -204,7 +204,7 @@ def test_line_split(): # was at the end of part1. So an empty part2 represents someone hitting # tab at the end of the line, the most common case. t = [ - ("run some/scrip", "", "some/scrip"), + ("run some/script", "", "some/script"), ("run scripts/er", "ror.py foo", "scripts/er"), ("echo $HOM", "", "HOM"), ("print sys.pa", "", "sys.pa"), diff --git a/IPython/core/tests/test_display.py b/IPython/core/tests/test_display.py index 2abd8cb..b7c5253 100644 --- a/IPython/core/tests/test_display.py +++ b/IPython/core/tests/test_display.py @@ -140,7 +140,7 @@ def test_image_filename_defaults(): format="badformat", embed=True, ) - # check boths paths to allow packages to test at build and install time + # check both paths to allow packages to test at build and install time imgfile = os.path.join(tpath, 'core/tests/2x2.png') img = display.Image(filename=imgfile) assert "png" == img.format diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py index 1d8b782..1a8e5d0 100644 --- a/IPython/core/tests/test_interactiveshell.py +++ b/IPython/core/tests/test_interactiveshell.py @@ -660,7 +660,7 @@ class TestSystemRaw(ExitCodeChecks): @mock.patch('os.system', side_effect=KeyboardInterrupt) def test_control_c(self, *mocks): try: - self.system("sleep 1 # wont happen") + self.system("sleep 1 # won't happen") except KeyboardInterrupt: # pragma: no cove self.fail( "system call should intercept " diff --git a/IPython/core/tests/test_run.py b/IPython/core/tests/test_run.py index 9687786..23337b3 100644 --- a/IPython/core/tests/test_run.py +++ b/IPython/core/tests/test_run.py @@ -579,7 +579,7 @@ def test_run_tb(): def test_multiprocessing_run(): """Set we can run mutiprocesgin without messing up up main namespace - Note that import `nose.tools as nt` mdify the value s + Note that import `nose.tools as nt` modify the values sys.module['__mp_main__'] so we need to temporarily set it to None to test the issue. """ diff --git a/IPython/core/tests/test_ultratb.py b/IPython/core/tests/test_ultratb.py index 8ed7387..c2e72e4 100644 --- a/IPython/core/tests/test_ultratb.py +++ b/IPython/core/tests/test_ultratb.py @@ -158,14 +158,14 @@ class NestedGenExprTestCase(unittest.TestCase): indentationerror_file = """if True: -zoon() +zoom() """ class IndentationErrorTest(unittest.TestCase): def test_indentationerror_shows_line(self): # See issue gh-2398 with tt.AssertPrints("IndentationError"): - with tt.AssertPrints("zoon()", suppress=False): + with tt.AssertPrints("zoom()", suppress=False): ip.run_cell(indentationerror_file) with TemporaryDirectory() as td: @@ -174,7 +174,7 @@ class IndentationErrorTest(unittest.TestCase): f.write(indentationerror_file) with tt.AssertPrints("IndentationError"): - with tt.AssertPrints("zoon()", suppress=False): + with tt.AssertPrints("zoom()", suppress=False): ip.magic('run %s' % fname) @skip_without("pandas") diff --git a/IPython/lib/pretty.py b/IPython/lib/pretty.py index 8a24632..48422c2 100644 --- a/IPython/lib/pretty.py +++ b/IPython/lib/pretty.py @@ -541,7 +541,7 @@ class RawText: class CallExpression: """ Object which emits a line-wrapped call expression in the form `__name(*args, **kwargs)` """ def __init__(__self, __name, *args, **kwargs): - # dunders are to avoid clashes with kwargs, as python's name manging + # dunders are to avoid clashes with kwargs, as python's name managing # will kick in. self = __self self.name = __name @@ -555,7 +555,7 @@ class CallExpression: return inner def _repr_pretty_(self, p, cycle): - # dunders are to avoid clashes with kwargs, as python's name manging + # dunders are to avoid clashes with kwargs, as python's name managing # will kick in. started = False diff --git a/IPython/terminal/shortcuts/auto_suggest.py b/IPython/terminal/shortcuts/auto_suggest.py index 65f9157..94a94a8 100644 --- a/IPython/terminal/shortcuts/auto_suggest.py +++ b/IPython/terminal/shortcuts/auto_suggest.py @@ -77,7 +77,7 @@ class NavigableAutoSuggestFromHistory(AutoSuggestFromHistory): def connect(self, pt_app: PromptSession): self._connected_apps.append(pt_app) # note: `on_text_changed` could be used for a bit different behaviour - # on character deletion (i.e. reseting history position on backspace) + # on character deletion (i.e. resetting history position on backspace) pt_app.default_buffer.on_text_insert.add_handler(self.reset_history_position) pt_app.default_buffer.on_cursor_position_changed.add_handler(self._dismiss) diff --git a/IPython/terminal/shortcuts/filters.py b/IPython/terminal/shortcuts/filters.py index 7c9d6a9..8e7c8d0 100644 --- a/IPython/terminal/shortcuts/filters.py +++ b/IPython/terminal/shortcuts/filters.py @@ -207,7 +207,7 @@ class PassThrough(Filter): pass_through = PassThrough() # these one is callable and re-used multiple times hence needs to be -# only defined once beforhand so that transforming back to human-readable +# only defined once beforehand so that transforming back to human-readable # names works well in the documentation. default_buffer_focused = has_focus(DEFAULT_BUFFER) diff --git a/IPython/utils/text.py b/IPython/utils/text.py index 46b3bb0..58ec421 100644 --- a/IPython/utils/text.py +++ b/IPython/utils/text.py @@ -347,7 +347,7 @@ def num_ini_spaces(strng): """Return the number of initial spaces in a string""" warnings.warn( "`num_ini_spaces` is Pending Deprecation since IPython 8.17." - "It is considered fro removal in in future version. " + "It is considered for removal in in future version. " "Please open an issue if you believe it should be kept.", stacklevel=2, category=PendingDeprecationWarning, @@ -408,7 +408,7 @@ def wrap_paragraphs(text, ncols=80): """ warnings.warn( "`wrap_paragraphs` is Pending Deprecation since IPython 8.17." - "It is considered fro removal in in future version. " + "It is considered for removal in in future version. " "Please open an issue if you believe it should be kept.", stacklevel=2, category=PendingDeprecationWarning, @@ -489,7 +489,7 @@ def strip_ansi(source): """ warnings.warn( "`strip_ansi` is Pending Deprecation since IPython 8.17." - "It is considered fro removal in in future version. " + "It is considered for removal in in future version. " "Please open an issue if you believe it should be kept.", stacklevel=2, category=PendingDeprecationWarning, @@ -727,7 +727,7 @@ def compute_item_matrix( """ warnings.warn( "`compute_item_matrix` is Pending Deprecation since IPython 8.17." - "It is considered fro removal in in future version. " + "It is considered for removal in in future version. " "Please open an issue if you believe it should be kept.", stacklevel=2, category=PendingDeprecationWarning, diff --git a/docs/source/conf.py b/docs/source/conf.py index 1c1bc21..3e13726 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -112,7 +112,7 @@ try: ) except ModuleNotFoundError: - # In case intersphinx_registry is not yet packages on current plaform + # In case intersphinx_registry is not yet packages on current platform # as it is quite recent. print("/!\\ intersphinx_registry not installed, relying on local mapping.") intersphinx_mapping = config["intersphinx_mapping"] diff --git a/docs/source/whatsnew/version0.9.rst b/docs/source/whatsnew/version0.9.rst index 8d5f73c..d7d11ef 100644 --- a/docs/source/whatsnew/version0.9.rst +++ b/docs/source/whatsnew/version0.9.rst @@ -221,7 +221,7 @@ New features * Gather/scatter are now implemented in the client to reduce the work load of the controller and improve performance. -* Complete rewrite of the IPython docuementation. All of the documentation +* Complete rewrite of the IPython documentation. All of the documentation from the IPython website has been moved into docs/source as restructured text documents. PDF and HTML documentation are being generated using Sphinx. diff --git a/docs/source/whatsnew/version7.rst b/docs/source/whatsnew/version7.rst index 9c51046..4f031d2 100644 --- a/docs/source/whatsnew/version7.rst +++ b/docs/source/whatsnew/version7.rst @@ -191,7 +191,7 @@ Virtualenv handling fixes: - init_virtualenv now uses Pathlib :ghpull:`12548` - Fix Improper path comparison of virtualenv directories :ghpull:`13140` - - Fix virtual environment user warning for lower case pathes :ghpull:`13094` + - Fix virtual environment user warning for lower case paths :ghpull:`13094` - Adapt to all sorts of drive names for cygwin :ghpull:`13153` New Features: @@ -589,7 +589,7 @@ issues and pushing 8.0 forward. Here are thus some of the changes for IPython 7.20. - Support for PyQt5 >= 5.11 :ghpull:`12715` - - ``%reset`` remove imports more agressively :ghpull:`12718` + - ``%reset`` remove imports more aggressively :ghpull:`12718` - fix the ``%conda`` magic :ghpull:`12739` - compatibility with Jedi 0.18, and bump minimum Jedi version. :ghpull:`12793` @@ -868,7 +868,7 @@ IPython. Increase Tab Completion Menu Height ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In terminal IPython it is possible to increase the hight of the tab-completion +In terminal IPython it is possible to increase the height of the tab-completion menu. To do so set the value of :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more space at the bottom of the screen for various kind of menus in IPython including @@ -1050,7 +1050,7 @@ IPython has decided to follow the informational `NEP 29 policy as to which version of (C)Python and NumPy are supported. We thus dropped support for Python 3.5, and cleaned up a number of code path -that were Python-version dependant. If you are on 3.5 or earlier pip should +that were Python-version dependent. If you are on 3.5 or earlier pip should automatically give you the latest compatible version of IPython so you do not need to pin to a given version. @@ -1117,7 +1117,7 @@ progressively enable these features by default in the next few releases, and contribution is welcomed. We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more -informations. +information. This is originally based on work form in :ghpull:`10610` from @stephanh42 started over two years ago, and still a lot need to be done. @@ -1371,7 +1371,7 @@ IPython 7.3.0 IPython 7.3.0 bring several bug fixes and small improvements that you will -described bellow. +described below. The biggest change to this release is the implementation of the ``%conda`` and ``%pip`` magics, that will attempt to install packages in the **current @@ -1456,7 +1456,7 @@ unwillingly relying on a bug in CPython. New Core Dev: - - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic + - We welcome Jonathan Slenders to the committers. Jonathan has done a fantastic work on prompt_toolkit, and we'd like to recognise his impact by giving him commit rights. :ghissue:`11397` diff --git a/docs/source/whatsnew/version8.rst b/docs/source/whatsnew/version8.rst index c231777..103f801 100644 --- a/docs/source/whatsnew/version8.rst +++ b/docs/source/whatsnew/version8.rst @@ -46,7 +46,7 @@ IPython 8.27 New release of IPython after a month off (not enough changes). We can see a few important changes for this release. - - autocall was beeing call getitem, :ghpull:`14486` + - autocall was being call getitem, :ghpull:`14486` - Only copy files in startup dir if we just created it. :ghpull:`14497` - Fix some tests on Python 3.13 RC1 :ghpull:`14504`; this one I guess make this the first IPython release officially compatible with Python 3.13; you will @@ -680,7 +680,7 @@ Python 3.12 changed its tokenizer to have better support for f-strings and allow This is a great new feature and performance improvement in Python 3.12. Unfortunately this means the new tokenizer does not support incomplete or invalid Python which will -break many features of IPython. Thus compatibility of IPython with Python 3.12 is not guarantied. +break many features of IPython. Thus compatibility of IPython with Python 3.12 is not guaranteed. It is unclear to which extent IPython is affected, and whether we can/should try to still support magics, shell escape (``! ....``), ..., as well as how to do it if we can. @@ -933,7 +933,7 @@ We introduce more descriptive names for the ``%autoreload`` parameter: whitelisted by ``%aimport`` statements. - ``%autoreload all`` (also ``%autoreload 2``) - turn on autoreload for all modules except those blacklisted by ``%aimport`` statements. -- ``%autoreload complete`` (also ``%autoreload 3``) - all the fatures of ``all`` but also adding new +- ``%autoreload complete`` (also ``%autoreload 3``) - all the features of ``all`` but also adding new objects from the imported modules (see IPython/extensions/tests/test_autoreload.py::test_autoload_newly_added_objects). @@ -1464,7 +1464,7 @@ values in order to prevent potential Execution with Unnecessary Privileges. Almost all version of IPython looks for configuration and profiles in current working directory. Since IPython was developed before pip and environments existed it was used a convenient way to load code/packages in a project -dependant way. +dependent way. In 2022, it is not necessary anymore, and can lead to confusing behavior where for example cloning a repository and starting IPython or loading a notebook from @@ -2394,4 +2394,4 @@ The following attribute/methods have been removed:: ------ -.. [1] If this make you incomfortable feel free to not use IPython 8.23. +.. [1] If this make you uncomfortable feel free to not use IPython 8.23. diff --git a/examples/IPython Kernel/Third Party Rich Output.ipynb b/examples/IPython Kernel/Third Party Rich Output.ipynb index e040310..ad7354e 100644 --- a/examples/IPython Kernel/Third Party Rich Output.ipynb +++ b/examples/IPython Kernel/Third Party Rich Output.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "A number of third party libraries defined their own custom display logic. This gives their objcts rich output by default when used in the Notebook." + "A number of third party libraries defined their own custom display logic. This gives their objects rich output by default when used in the Notebook." ] }, { diff --git a/pyproject.toml b/pyproject.toml index d57dc85..8f2a0a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -155,7 +155,7 @@ check_untyped_defs = false disallow_untyped_decorators = false -# gloabl ignore error +# global ignore error [[tool.mypy.overrides]] module = [ "IPython", diff --git a/tools/gh_api.py b/tools/gh_api.py index 2a34e6a..bee7018 100644 --- a/tools/gh_api.py +++ b/tools/gh_api.py @@ -48,7 +48,7 @@ def get_auth_token(): return token print( - "Get a token fom https://github.com/settings/tokens with public repo and gist." + "Get a token from https://github.com/settings/tokens with public repo and gist." ) token = getpass.getpass("Token: ", stream=sys.stderr)