Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
64801957
Commit
64801957
authored
Mar 11, 2017
by
syrte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import_all: skip single underscore
skip single underscore minor restructure
parent
a2a6cccf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
Cython/Build/IpythonMagic.py
Cython/Build/IpythonMagic.py
+9
-8
No files found.
Cython/Build/IpythonMagic.py
View file @
64801957
...
...
@@ -95,15 +95,16 @@ class CythonMagics(Magics):
def
_import_all
(
self
,
module
):
mdict
=
module
.
__dict__
if
'__all__'
in
mdict
:
for
k
in
mdict
[
'__all__'
]:
if
k
in
mdict
:
self
.
shell
.
push
({
k
:
mdict
[
k
]})
keys
=
mdict
[
'__all__'
]
else
:
raise
AttributeError
(
"'module' object has no attribute '%s'"
%
k
)
else
:
for
k
,
v
in
mdict
.
items
():
if
not
k
.
startswith
(
'__'
):
self
.
shell
.
push
({
k
:
v
})
keys
=
[
k
for
k
in
mdict
if
not
k
.
startswith
(
'_'
)]
for
k
in
keys
:
try
:
self
.
shell
.
push
({
k
:
mdict
[
k
]})
except
KeyError
:
msg
=
"'module' object has no attribute '%s'"
%
k
raise
AttributeError
(
msg
)
@
cell_magic
def
cython_inline
(
self
,
line
,
cell
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment