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

replace self.config with self.linter.config in class StringQuoteChecker #2

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

Conversation

4nds
Copy link

@4nds 4nds commented Feb 21, 2024

This PR fixes 4nds#1.

It resolves AttributeError: 'StringQuoteChecker' object has no attribute 'config' in

preferred_quote = SMART_QUOTE_OPTS.get(self.config.string_quote)

Property config of StringQuoteChecker class was depreciated since Pylint 2.14.0,

The config attribute of BaseChecker has been deprecated. You can use checker.linter.config to access the global configuration object instead of a checker-specific object.

and later removed in Pylint 3.0.0.

This PR replaces self.config with self.linter.config in 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 (StringQuoteChecker.config) with release of pylint==3.0.0
1 participant