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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
6528682e
Commit
6528682e
authored
Nov 05, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reformat some code
parent
fd38977b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+3
-5
No files found.
Cython/Compiler/Main.py
View file @
6528682e
...
@@ -110,8 +110,7 @@ class Context(object):
...
@@ -110,8 +110,7 @@ class Context(object):
def
nonfatal_error
(
self
,
exc
):
def
nonfatal_error
(
self
,
exc
):
return
Errors
.
report_error
(
exc
)
return
Errors
.
report_error
(
exc
)
def
find_module
(
self
,
module_name
,
def
find_module
(
self
,
module_name
,
relative_to
=
None
,
pos
=
None
,
need_pxd
=
1
,
check_module_name
=
True
):
relative_to
=
None
,
pos
=
None
,
need_pxd
=
1
,
check_module_name
=
True
):
# Finds and returns the module scope corresponding to
# Finds and returns the module scope corresponding to
# the given relative or absolute module name. If this
# the given relative or absolute module name. If this
# is the first time the module has been requested, finds
# is the first time the module has been requested, finds
...
@@ -122,15 +121,14 @@ class Context(object):
...
@@ -122,15 +121,14 @@ class Context(object):
debug_find_module
=
0
debug_find_module
=
0
if
debug_find_module
:
if
debug_find_module
:
print
(
"Context.find_module: module_name = %s, relative_to = %s, pos = %s, need_pxd = %s"
%
(
print
(
"Context.find_module: module_name = %s, relative_to = %s, pos = %s, need_pxd = %s"
%
(
module_name
,
relative_to
,
pos
,
need_pxd
))
module_name
,
relative_to
,
pos
,
need_pxd
))
scope
=
None
scope
=
None
pxd_pathname
=
None
pxd_pathname
=
None
if
check_module_name
and
not
module_name_pattern
.
match
(
module_name
):
if
check_module_name
and
not
module_name_pattern
.
match
(
module_name
):
if
pos
is
None
:
if
pos
is
None
:
pos
=
(
module_name
,
0
,
0
)
pos
=
(
module_name
,
0
,
0
)
raise
CompileError
(
pos
,
raise
CompileError
(
pos
,
"'%s' is not a valid module name"
%
module_name
)
"'%s' is not a valid module name"
%
module_name
)
if
relative_to
:
if
relative_to
:
if
debug_find_module
:
if
debug_find_module
:
print
(
"...trying relative import"
)
print
(
"...trying relative import"
)
...
...
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