File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 pip install mypy pyflakes flake8
2727 - name : Lint with mypy
2828 run : |
29- mypy IPython/terminal/ptutils.py
30- mypy IPython/core/magics/*.py
31- mypy IPython/terminal/__init__.py
32- mypy IPython/terminal/console.py
33- #mypy IPython/terminal/debugger.py
34- #mypy IPython/terminal/embed.py
35- mypy IPython/terminal/interactiveshell.py
36- mypy IPython/terminal/ipapp.py
37- mypy IPython/terminal/magics.py
38- mypy IPython/terminal/prompts.py
39- mypy IPython/terminal/ptshell.py
40- mypy IPython/terminal/ptutils.py
41- mypy IPython/terminal/shortcuts.py
42- mypy IPython/core/c*.py
29+ mypy -p IPython.terminal
30+ mypy -p IPython.core.magics
4331 - name : Lint with pyflakes
4432 run : |
4533 flake8 IPython/core/magics/script.py
34+ flake8 IPython/core/magics/packaging.py
Original file line number Diff line number Diff line change @@ -161,6 +161,6 @@ def set_trace(frame=None):
161161 # happened after hitting "c", this is needed in order to
162162 # be able to quit the debugging session (see #9950).
163163 old_trace_dispatch = pdb .Pdb .trace_dispatch
164- pdb .Pdb = TerminalPdb
165- pdb .Pdb .trace_dispatch = old_trace_dispatch
164+ pdb .Pdb = TerminalPdb # type: ignore
165+ pdb .Pdb .trace_dispatch = old_trace_dispatch # type: ignore
166166 pdb .main ()
Original file line number Diff line number Diff line change 1919from traitlets import Bool , CBool , Unicode
2020from IPython .utils .io import ask_yes_no
2121
22+ from typing import Set
23+
2224class KillEmbedded (Exception ):pass
2325
2426# kept for backward compatibility as IPython 6 was released with
@@ -123,17 +125,17 @@ class InteractiveShellEmbed(TerminalInteractiveShell):
123125 help = "Automatically set the terminal title"
124126 ).tag (config = True )
125127
126- _inactive_locations = set ()
128+ _inactive_locations : Set [str ] = set ()
129+
130+ def _disable_init_location (self ):
131+ """Disable the current Instance creation location"""
132+ InteractiveShellEmbed ._inactive_locations .add (self ._init_location_id )
127133
128134 @property
129135 def embedded_active (self ):
130136 return (self ._call_location_id not in InteractiveShellEmbed ._inactive_locations )\
131137 and (self ._init_location_id not in InteractiveShellEmbed ._inactive_locations )
132138
133- def _disable_init_location (self ):
134- """Disable the current Instance creation location"""
135- InteractiveShellEmbed ._inactive_locations .add (self ._init_location_id )
136-
137139 @embedded_active .setter
138140 def embedded_active (self , value ):
139141 if value :
Original file line number Diff line number Diff line change 99import ctypes .util
1010from threading import Event
1111
12- objc = ctypes .cdll .LoadLibrary (ctypes .util .find_library (' objc' ))
12+ objc = ctypes .cdll .LoadLibrary (ctypes .util .find_library (" objc" )) # type: ignore
1313
1414void_p = ctypes .c_void_p
1515
@@ -37,7 +37,7 @@ def C(classname):
3737# end obj-c boilerplate from appnope
3838
3939# CoreFoundation C-API calls we will use:
40- CoreFoundation = ctypes .cdll .LoadLibrary (ctypes .util .find_library (' CoreFoundation' ))
40+ CoreFoundation = ctypes .cdll .LoadLibrary (ctypes .util .find_library (" CoreFoundation" )) # type: ignore
4141
4242CFFileDescriptorCreate = CoreFoundation .CFFileDescriptorCreate
4343CFFileDescriptorCreate .restype = void_p
You can’t perform that action at this time.
0 commit comments