Commit d9db5fb0 authored by Stefan Behnel's avatar Stefan Behnel

reformat some code

parent 54961a30
...@@ -30,12 +30,11 @@ class NonManglingModuleScope(Symtab.ModuleScope): ...@@ -30,12 +30,11 @@ class NonManglingModuleScope(Symtab.ModuleScope):
else: else:
return Symtab.ModuleScope.mangle(self, prefix) return Symtab.ModuleScope.mangle(self, prefix)
class CythonUtilityCodeContext(StringParseContext): class CythonUtilityCodeContext(StringParseContext):
scope = None scope = None
def find_module(self, module_name, relative_to = None, pos = None, def find_module(self, module_name, relative_to=None, pos=None, need_pxd=True):
need_pxd = 1):
if module_name != self.module_name: if module_name != self.module_name:
if module_name not in self.modules: if module_name not in self.modules:
raise AssertionError("Only the cython cimport is supported.") raise AssertionError("Only the cython cimport is supported.")
...@@ -43,10 +42,8 @@ class CythonUtilityCodeContext(StringParseContext): ...@@ -43,10 +42,8 @@ class CythonUtilityCodeContext(StringParseContext):
return self.modules[module_name] return self.modules[module_name]
if self.scope is None: if self.scope is None:
self.scope = NonManglingModuleScope(self.prefix, self.scope = NonManglingModuleScope(
module_name, self.prefix, module_name, parent_module=None, context=self)
parent_module=None,
context=self)
return self.scope return self.scope
...@@ -101,8 +98,8 @@ class CythonUtilityCode(Code.UtilityCodeBase): ...@@ -101,8 +98,8 @@ class CythonUtilityCode(Code.UtilityCodeBase):
context.prefix = self.prefix context.prefix = self.prefix
context.cython_scope = cython_scope context.cython_scope = cython_scope
#context = StringParseContext(self.name) #context = StringParseContext(self.name)
tree = parse_from_strings(self.name, self.impl, context=context, tree = parse_from_strings(
allow_struct_enum_decorator=True) self.name, self.impl, context=context, allow_struct_enum_decorator=True)
pipeline = Pipeline.create_pipeline(context, 'pyx', exclude_classes=excludes) pipeline = Pipeline.create_pipeline(context, 'pyx', exclude_classes=excludes)
if entries_only: if entries_only:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment