Skip to content

Commit

Permalink
Avoid repeat rename
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyBourne committed Apr 29, 2024
1 parent 7f00bc3 commit 3c8023d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyccel/codegen/printing/ccode.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ def _print_ModuleHeader(self, expr):

def _print_Module(self, expr):
self.set_scope(expr.scope)
self._current_module = expr.name
self._current_module = expr
body = ''.join(self._print(i) for i in expr.body)

global_variables = ''.join([self._print(d) for d in expr.declarations])
Expand Down Expand Up @@ -951,7 +951,7 @@ def _print_Import(self, expr):
if source in import_dict: # pylint: disable=consider-using-get
source = import_dict[source]

if expr.source_module:
if expr.source_module and expr.source_module is not self._current_module:
for classDef in expr.source_module.classes:
class_scope = classDef.scope
for method in classDef.methods:
Expand Down

0 comments on commit 3c8023d

Please sign in to comment.