Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d824693

Browse files
committed
Various fixes and cleanup
1 parent f99e514 commit d824693

6 files changed

Lines changed: 12 additions & 23 deletions

File tree

.github/workflows/downstream.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
permissions:
1212
contents: read
1313

14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: t
17+
1418
jobs:
1519
test:
1620
runs-on: ${{ matrix.os }}

IPython/core/getipython.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# encoding: utf-8
21
"""Simple function to call to get the current InteractiveShell instance
32
"""
43

IPython/core/ultratb.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
# it is too long.
112112
FAST_THRESHOLD = 10_000
113113

114-
115114
# ---------------------------------------------------------------------------
116115
class ListTB(TBTools):
117116
"""Print traceback information from a traceback list, with optional color.

IPython/utils/text.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -261,26 +261,10 @@ def sort( # type:ignore[override]
261261
return type(self)([t[1] for t in dsu])
262262

263263

264-
# FIXME: We need to reimplement type specific displayhook and then add this
265-
# back as a custom printer. This should also be moved outside utils into the
266-
# core.
267-
268-
# def print_slist(arg):
269-
# """ Prettier (non-repr-like) and more informative printer for SList """
270-
# print("SList (.p, .n, .l, .s, .grep(), .fields(), sort() available):")
271-
# if hasattr(arg, 'hideonce') and arg.hideonce:
272-
# arg.hideonce = False
273-
# return
274-
#
275-
# nlprint(arg) # This was a nested list printer, now removed.
276-
#
277-
# print_slist = result_display.register(SList)(print_slist)
278-
279-
280264
def indent(instr: str, nspaces: int = 4, ntabs: int = 0, flatten: bool = False) -> str:
281265
"""Indent a string a given number of spaces or tabstops.
282266
283-
indent(str,nspaces=4,ntabs=0) -> indent str by ntabs+nspaces.
267+
indent(str, nspaces=4, ntabs=0) -> indent str by ntabs+nspaces.
284268
285269
Parameters
286270
----------
@@ -300,9 +284,7 @@ def indent(instr: str, nspaces: int = 4, ntabs: int = 0, flatten: bool = False)
300284
str : string indented by ntabs and nspaces.
301285
302286
"""
303-
if instr is None:
304-
return
305-
ind = '\t'*ntabs+' '*nspaces
287+
ind = "\t" * ntabs + " " * nspaces
306288
if flatten:
307289
pat = re.compile(r'^\s*', re.MULTILINE)
308290
else:

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ all = [
110110
"ipython[test,test_extra]",
111111
]
112112

113+
113114
[tool.mypy]
114115
python_version = "3.11"
115116
ignore_missing_imports = true
@@ -136,6 +137,9 @@ exclude = [
136137
disallow_incomplete_defs = true
137138
disallow_untyped_defs = true
138139
warn_redundant_casts = true
140+
#enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
141+
#warn_unreachable = true
142+
#strict = true
139143

140144
[[tool.mypy.overrides]]
141145
module = [
@@ -316,6 +320,7 @@ check_untyped_defs = false
316320
disallow_untyped_decorators = false
317321

318322
[tool.pytest.ini_options]
323+
minversion = "7"
319324
addopts = [
320325
"--durations=10",
321326
"-pIPython.testing.plugin.pytest_ipdoctest",

tests/test_completerlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def test_module_without_init():
174174
175175
https://github.com/ipython/ipython/issues/11226
176176
"""
177-
fake_module_name = "foo"
177+
fake_module_name = "foo_xder_134"
178178
with TemporaryDirectory() as tmpdir:
179179
sys.path.insert(0, tmpdir)
180180
try:

0 commit comments

Comments
 (0)