[gi-docgen] Revert "Fix Girparser.parse typing"



commit 6a9e4cacb1d4a022f045c9b2a56facb7613c7cc3
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Aug 2 01:18:07 2022 +0100

    Revert "Fix Girparser.parse typing"
    
    This reverts commit f528665cc26baf597d980571c0bf6a0faccf0311.
    
    The `X | Y` type annotation requires Python 3.10+, which is not
    something we can commit to at the moment.

 gidocgen/gir/parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gidocgen/gir/parser.py b/gidocgen/gir/parser.py
index aaa9abe..ca779a2 100644
--- a/gidocgen/gir/parser.py
+++ b/gidocgen/gir/parser.py
@@ -85,7 +85,7 @@ class GirParser:
         """Prepend a path to the list of search paths"""
         self._search_paths = [path] + self._search_paths
 
-    def parse(self, girfile: T.TextIO | str) -> None:
+    def parse(self, girfile: T.TextIO) -> None:
         """Parse @girfile"""
         log.debug(f"Loading GIR for {girfile}")
         tree = ET.parse(girfile)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]