mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Support Python 3.9
Remove the '|' syntax for type unions, since it's a 3.10 feature, and set mypy to check with version 3.9.
This commit is contained in:
parent
d6c6a66c15
commit
0b8012b8e1
7 changed files with 18 additions and 11 deletions
|
@ -17,6 +17,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
import typing as T
|
||||
|
||||
from .gtkbuilder_template import Template
|
||||
from .common import *
|
||||
|
@ -45,7 +46,7 @@ class Signal(AstNode):
|
|||
return self.tokens["name"]
|
||||
|
||||
@property
|
||||
def detail_name(self) -> str | None:
|
||||
def detail_name(self) -> T.Optional[str]:
|
||||
return self.tokens["detail_name"]
|
||||
|
||||
@property
|
||||
|
@ -53,7 +54,7 @@ class Signal(AstNode):
|
|||
return self.tokens["handler"]
|
||||
|
||||
@property
|
||||
def object_id(self) -> str | None:
|
||||
def object_id(self) -> T.Optional[str]:
|
||||
return self.tokens["object"]
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue