Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

AttributeError: 'ClassDef' object has no attribute 'args'](url) #435

@ucabsdp

Description

@ucabsdp

Running release 5.0.0 on Travis:

Traceback (most recent call last):
File "/opt/python/3.6.7/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/opt/python/3.6.7/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/main.py", line 19, in
main()
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/main.py", line 15, in main
cli.main()
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/cli.py", line 68, in main
sys.exit(run_pydocstyle())
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/cli.py", line 45, in run_pydocstyle
ignore_decorators=ignore_decorators))
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/checker.py", line 968, in check
ignore_decorators):
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/checker.py", line 123, in check_source
for error in errors:
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/checker.py", line 916, in check_docstring_sections
yield from self._check_google_sections(lines, definition, docstring)
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/checker.py", line 902, in _check_google_sections
yield from self._check_google_section(docstring, definition, ctx)
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/checker.py", line 795, in _check_google_section
yield from cls._check_args_section(docstring, definition, context)
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/checker.py", line 748, in _check_args_section
yield from ConventionChecker._check_missing_args(docstring_args, definition)
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/checker.py", line 761, in _check_missing_args
function_args = get_function_args(definition.source)
File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pydocstyle/checker.py", line 1001, in get_function_args
function_arg_node = ast.parse(textwrap.dedent(function_string)).body[0].args
AttributeError: 'ClassDef' object has no attribute 'args'](url)

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