Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

replace node.doc with node.doc_node in method _process_for_docstring #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

4nds
Copy link

@4nds 4nds commented Feb 22, 2024

This PR fixes 4nds#2.

It resolves AttributeError: 'Module' object has no attribute 'doc' in

if node.doc is not None:

Attribute doc was depreciated since Astroid 2.11.0,

Accessing the doc attribute of nodes.Module, nodes.ClassDef, and nodes.FunctionDef has been deprecated in favour of the doc_node attribute. Note: doc_node is an (optional) nodes.Const whereas doc was an (optional) str.

and later removed in Astroid 3.0.0,

Remove deprecated doc attribute for Module, ClassDef, and FunctionDef. Use the doc_node attribute instead.

This PR replaces node.doc with node.doc_node in method _process_for_docstring of class StringQuoteChecker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError (Module.doc) with release of pylint==3.0.0 and astroid==3.0.0
1 participant