summaryrefslogtreecommitdiff
path: root/pylint/config/options_provider_mixin.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-02-10 19:30:15 +0100
committerGitHub <noreply@github.com>2022-02-10 19:30:15 +0100
commit595ec422d6f9bd32f42c356d2f316ec69e0f7bee (patch)
tree766a12ddd91b43e09f670f913a4069bc7dc82d57 /pylint/config/options_provider_mixin.py
parente3d5deca2886d9e2d5f2be2a252e39e02ae42b96 (diff)
downloadpylint-git-595ec422d6f9bd32f42c356d2f316ec69e0f7bee.tar.gz
Update ``pydocstringformatter`` to 0.4.0 (#5787)
Diffstat (limited to 'pylint/config/options_provider_mixin.py')
-rw-r--r--pylint/config/options_provider_mixin.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/pylint/config/options_provider_mixin.py b/pylint/config/options_provider_mixin.py
index d3872135c..8c6204586 100644
--- a/pylint/config/options_provider_mixin.py
+++ b/pylint/config/options_provider_mixin.py
@@ -9,11 +9,11 @@ from pylint.config.option import _validate
class UnsupportedAction(Exception):
- """raised by set_option when it doesn't know what to do for an action"""
+ """Raised by set_option when it doesn't know what to do for an action."""
class OptionsProviderMixIn:
- """Mixin to provide options to an OptionsManager"""
+ """Mixin to provide options to an OptionsManager."""
# those attributes should be overridden
priority = -1
@@ -26,7 +26,7 @@ class OptionsProviderMixIn:
self.load_defaults()
def load_defaults(self):
- """initialize the provider using default values"""
+ """Initialize the provider using default values."""
for opt, optdict in self.options:
action = optdict.get("action")
if action != "callback":
@@ -37,17 +37,17 @@ class OptionsProviderMixIn:
self.set_option(opt, default, action, optdict)
def option_attrname(self, opt, optdict=None):
- """get the config attribute corresponding to opt"""
+ """Get the config attribute corresponding to opt."""
if optdict is None:
optdict = self.get_option_def(opt)
return optdict.get("dest", opt.replace("-", "_"))
def option_value(self, opt):
- """get the current value for the given option"""
+ """Get the current value for the given option."""
return getattr(self.config, self.option_attrname(opt), None)
def set_option(self, optname, value, action=None, optdict=None):
- """method called to set an option (registered in the options list)"""
+ """Method called to set an option (registered in the options list)."""
if optdict is None:
optdict = self.get_option_def(optname)
if value is not None:
@@ -80,7 +80,7 @@ class OptionsProviderMixIn:
raise UnsupportedAction(action)
def get_option_def(self, opt):
- """return the dictionary defining an option given its name"""
+ """Return the dictionary defining an option given its name."""
assert self.options
for option in self.options:
if option[0] == opt:
@@ -90,7 +90,7 @@ class OptionsProviderMixIn:
)
def options_by_section(self):
- """return an iterator on options grouped by section
+ """Return an iterator on options grouped by section.
(section, [list of (optname, optdict, optvalue)])
"""