Skip to content

Commit

Permalink
Fix mypy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Oct 30, 2023
1 parent 26f51f3 commit 238dfb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ford/sourceform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,8 @@ def assign_implementation_attributes(proc, base):

for proc in filter(lambda p: p.module, self.routines):
intr = self.all_procs.get(proc.name.lower(), None)
if intr is None or isinstance(intr, FortranInterface):
continue
if isinstance(intr, FortranModuleProcedureInterface):
proc.module = intr
intr.procedure.module = proc
Expand Down Expand Up @@ -1479,7 +1481,7 @@ def get_label_item(context, label):
context = item
elif isinstance(item, FortranVariable):
type_str = strip_type(item.full_type)
if item.parent is None:
if not isinstance(item.parent, FortranCodeUnit):
return None
context = item.parent.all_types.get(type_str, None)
else:
Expand Down

0 comments on commit 238dfb7

Please sign in to comment.