mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Fix mypy errors & other bugs
This commit is contained in:
parent
98ba7d467a
commit
90001bd885
2 changed files with 12 additions and 12 deletions
|
@ -104,8 +104,8 @@ class LiteralExpr(Expr):
|
|||
def type_complete(self) -> bool:
|
||||
from .values import IdentLiteral
|
||||
|
||||
if isinstance(self.literal, IdentLiteral):
|
||||
if object := self.root.objects_by_id.get(self.ident):
|
||||
if isinstance(self.literal.value, IdentLiteral):
|
||||
if object := self.root.objects_by_id.get(self.literal.value.ident):
|
||||
return not isinstance(object, Template)
|
||||
return True
|
||||
|
||||
|
@ -141,7 +141,7 @@ class LookupOp(InfixExpr):
|
|||
],
|
||||
)
|
||||
|
||||
if isinstance(self.lhs.type, UncheckedType):
|
||||
if isinstance(self.lhs.type, UncheckedType) or not self.lhs.type_complete:
|
||||
return
|
||||
|
||||
elif not isinstance(self.lhs.type, gir.Class) and not isinstance(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue