[gi-docgen: 1/2] Fix Girparser.parse typing




commit f528665cc26baf597d980571c0bf6a0faccf0311
Author: fcole90 <fcole90 gmail com>
Date:   Fri Jul 22 19:24:08 2022 +0200

    Fix Girparser.parse typing

 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 ca779a2..aaa9abe 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) -> None:
+    def parse(self, girfile: T.TextIO | str) -> 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]