Skip to content

[bug] namespace shouldn't be None #119

@Freed-Wu

Description

@Freed-Wu
❯ vimdoc .
/usr/lib/python3.10/site-packages/vimdoc/block.py:224: DocumentationWarning: Documentation claims optional parameters that function A does not accept.
  warnings.warn(
Traceback (most recent call last):
  File "/usr/bin/vimdoc", line 5, in <module>
    vimdoc.__main__.main()
  File "/usr/lib/python3.10/site-packages/vimdoc/__main__.py", line 18, in main
    for module in Modules(args.plugin):
  File "/usr/lib/python3.10/site-packages/vimdoc/module.py", line 440, in Modules
    module.Close()
  File "/usr/lib/python3.10/site-packages/vimdoc/module.py", line 115, in Close
    if self.GetCollection(vimdoc.FUNCTION) and 'functions' not in self.sections:
  File "/usr/lib/python3.10/site-packages/vimdoc/module.py", line 105, in GetCollection
    non_default_names = set(x.TagName() for x in collection
  File "/usr/lib/python3.10/site-packages/vimdoc/module.py", line 105, in <genexpr>
    non_default_names = set(x.TagName() for x in collection
  File "/usr/lib/python3.10/site-packages/vimdoc/block.py", line 259, in TagName
    return '{}()'.format(self.FullName())
  File "/usr/lib/python3.10/site-packages/vimdoc/block.py", line 248, in FullName
    return self.locals.get('namespace', '') + self.LocalName()
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
""
" @section Introduction, intro
" @library

""
" Test
function! Test() abort
  echo 1
endfunction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions