Skip to content

Commit 209f369

Browse files
committed
formatting
1 parent 912098e commit 209f369

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

IPython/core/completer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,9 +1362,9 @@ def filter_prefix_tuple(key):
13621362
# All checks passed!
13631363
return True
13641364

1365-
filtered_key_is_final: Dict[Union[str, bytes, int, float], _DictKeyState] = (
1366-
defaultdict(lambda: _DictKeyState.BASELINE)
1367-
)
1365+
filtered_key_is_final: Dict[
1366+
Union[str, bytes, int, float], _DictKeyState
1367+
] = defaultdict(lambda: _DictKeyState.BASELINE)
13681368

13691369
for k in keys:
13701370
# If at least one of the matches is not final, mark as undetermined.

IPython/core/guarded_eval.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,20 @@
4444

4545
@undoc
4646
class HasGetItem(Protocol):
47-
def __getitem__(self, key) -> None: ...
47+
def __getitem__(self, key) -> None:
48+
...
4849

4950

5051
@undoc
5152
class InstancesHaveGetItem(Protocol):
52-
def __call__(self, *args, **kwargs) -> HasGetItem: ...
53+
def __call__(self, *args, **kwargs) -> HasGetItem:
54+
...
5355

5456

5557
@undoc
5658
class HasGetAttr(Protocol):
57-
def __getattr__(self, key) -> None: ...
59+
def __getattr__(self, key) -> None:
60+
...
5861

5962

6063
@undoc
@@ -326,9 +329,9 @@ class EvaluationContext(NamedTuple):
326329
#: Global namespace
327330
globals: dict
328331
#: Evaluation policy identifier
329-
evaluation: Literal["forbidden", "minimal", "limited", "unsafe", "dangerous"] = (
330-
"forbidden"
331-
)
332+
evaluation: Literal[
333+
"forbidden", "minimal", "limited", "unsafe", "dangerous"
334+
] = "forbidden"
332335
#: Whether the evaluation of code takes place inside of a subscript.
333336
#: Useful for evaluating ``:-1, 'col'`` in ``df[:-1, 'col']``.
334337
in_subscript: bool = False

IPython/core/tests/test_formatters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,8 @@ def test_custom_repr_namedtuple_partialmethod():
535535
from functools import partialmethod
536536
from typing import NamedTuple
537537

538-
class Foo(NamedTuple): ...
538+
class Foo(NamedTuple):
539+
...
539540

540541
Foo.__repr__ = partialmethod(lambda obj: "Hello World")
541542
foo = Foo()

0 commit comments

Comments
 (0)