mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Fix mypy issues
This commit is contained in:
parent
1150ae1a09
commit
cb35acad17
3 changed files with 19 additions and 15 deletions
|
@ -1,7 +1,8 @@
|
|||
""" Contains all the syntax beyond basic objects, properties, signal, and
|
||||
templates. """
|
||||
|
||||
from .gobject_object import Object
|
||||
from .attributes import BaseAttribute, BaseTypedAttribute
|
||||
from .gobject_object import Object, ObjectContent
|
||||
from .gobject_property import Property
|
||||
from .gobject_signal import Signal
|
||||
from .gtk_a11y import A11y
|
||||
|
@ -14,6 +15,7 @@ from .gtk_string_list import Strings
|
|||
from .gtk_styles import Styles
|
||||
from .gtkbuilder_child import Child
|
||||
from .gtkbuilder_template import Template
|
||||
from .imports import GtkDirective, Import
|
||||
from .ui import UI
|
||||
from .values import IdentValue, TranslatedStringValue, FlagsValue, LiteralValue
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
|
||||
import typing as T
|
||||
from .common import *
|
||||
|
||||
|
||||
|
@ -41,11 +42,11 @@ class ObjectContent(AstNode):
|
|||
x.emit_xml(xml)
|
||||
|
||||
class Object(AstNode):
|
||||
grammar = Sequence(
|
||||
grammar: T.Any = [
|
||||
class_name,
|
||||
Optional(UseIdent("id")),
|
||||
ObjectContent,
|
||||
)
|
||||
]
|
||||
|
||||
@validate("namespace")
|
||||
def gir_ns_exists(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue