diff options
author | Aylur <[email protected]> | 2024-12-21 21:25:29 +0100 |
---|---|---|
committer | Aylur <[email protected]> | 2024-12-21 21:25:29 +0100 |
commit | e0a6b7fc5ae38f13e5c110956bb94ac3b41bfb14 (patch) | |
tree | aebfe3e620372efdd595f6479268bc551e4c519a /nix/gi-docgen.patch | |
parent | fcef5cea5ca84fa06a74e69de34e84b4d0842fcc (diff) | |
parent | 0507a6bf1035ddbe72fdb64c0fb5dc1c991faeaf (diff) |
Merge branch 'main' into feat/wayland-glib
Diffstat (limited to 'nix/gi-docgen.patch')
-rw-r--r-- | nix/gi-docgen.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nix/gi-docgen.patch b/nix/gi-docgen.patch new file mode 100644 index 0000000..0ecb4bd --- /dev/null +++ b/nix/gi-docgen.patch @@ -0,0 +1,17 @@ +diff --git a/gidocgen/gir/parser.py b/gidocgen/gir/parser.py +index e62835d..7ee60fa 100644 +--- a/gidocgen/gir/parser.py ++++ b/gidocgen/gir/parser.py +@@ -288,7 +288,11 @@ class GirParser: + + content = child.text or "" + +- return ast.Doc(content=content, filename=child.attrib['filename'], line=int(child.attrib['line'])) ++ return ast.Doc( ++ content=content, ++ filename=child.attrib.get('filename', ''), ++ line=int(child.attrib.get('line', 0)), ++ ) + + def _maybe_parse_source_position(self, node: ET.Element) -> T.Optional[ast.SourcePosition]: + child = node.find('core:source-position', GI_NAMESPACES) |