diff options
author | kotontrion <[email protected]> | 2024-10-29 13:50:41 +0100 |
---|---|---|
committer | kotontrion <[email protected]> | 2024-10-29 13:50:41 +0100 |
commit | 57f20666e716fde56579b8aa638eed1264f793de (patch) | |
tree | 59b2ebbd770c80049cea4df82109d28f617675fe /nix/doc/gi-docgen.patch | |
parent | 4d9ae88b0bab75779876d465f986791d052414ca (diff) | |
parent | 7e484188e7492ac7945c854bcc3f26cec1863c91 (diff) |
Merge branch 'main' into feat/cava
Diffstat (limited to 'nix/doc/gi-docgen.patch')
-rw-r--r-- | nix/doc/gi-docgen.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nix/doc/gi-docgen.patch b/nix/doc/gi-docgen.patch new file mode 100644 index 0000000..0ecb4bd --- /dev/null +++ b/nix/doc/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) |