diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2017-05-12 20:34:15 -0500 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2017-05-12 20:34:15 -0500 |
| commit | 32f4b65b6b4bb913e8f5201fc0a718878bfec7df (patch) | |
| tree | 355c4ea13f221c7ae317d6ced5cf9d89486f3a04 /src | |
| parent | 0e9bbab55134be3e1ce0b57046779d3e991740c5 (diff) | |
| download | flake8-32f4b65b6b4bb913e8f5201fc0a718878bfec7df.tar.gz | |
Fix docstring violations
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/api/legacy.py | 6 | ||||
| -rw-r--r-- | src/flake8/main/cli.py | 2 | ||||
| -rw-r--r-- | src/flake8/options/manager.py | 5 | ||||
| -rw-r--r-- | src/flake8/plugins/manager.py | 7 |
4 files changed, 9 insertions, 11 deletions
diff --git a/src/flake8/api/legacy.py b/src/flake8/api/legacy.py index e9d5630..2b983c8 100644 --- a/src/flake8/api/legacy.py +++ b/src/flake8/api/legacy.py @@ -68,7 +68,7 @@ class StyleGuide(object): @property def options(self): - """The parsed options. + """Return application's options. An instance of :class:`optparse.Values` containing parsed options. """ @@ -76,7 +76,7 @@ class StyleGuide(object): @property def paths(self): - """The extra arguments passed as paths.""" + """Return the extra arguments passed as paths.""" return self._application.paths def check_files(self, paths=None): @@ -178,7 +178,7 @@ class Report(object): @property def total_errors(self): - """The total number of errors found by Flake8.""" + """Return the total number of errors.""" return self._application.result_count def get_statistics(self, violation): diff --git a/src/flake8/main/cli.py b/src/flake8/main/cli.py index 29bd159..8ba6288 100644 --- a/src/flake8/main/cli.py +++ b/src/flake8/main/cli.py @@ -4,7 +4,7 @@ from flake8.main import application def main(argv=None): # type: (Union[NoneType, List[str]]) -> NoneType - """Main entry-point for the flake8 command-line tool. + """Execute the main bit of the application. This handles the creation of an instance of :class:`Application`, runs it, and then exits the application. diff --git a/src/flake8/options/manager.py b/src/flake8/options/manager.py index 90cfe46..7b23732 100644 --- a/src/flake8/options/manager.py +++ b/src/flake8/options/manager.py @@ -103,8 +103,7 @@ class Option(object): self._opt = None - def __repr__(self): - """Simple representation of an Option class.""" + def __repr__(self): # noqa: D105 return ( 'Option({0}, {1}, action={action}, default={default}, ' 'dest={dest}, type={type}, callback={callback}, help={help},' @@ -268,7 +267,7 @@ class OptionManager(object): setattr(options, option.dest, option.normalize(old_value)) def parse_args(self, args=None, values=None): - """Simple proxy to calling the OptionParser's parse_args method.""" + """Proxy to calling the OptionParser's parse_args method.""" self.generate_epilog() self.update_version_string() options, xargs = self.parser.parse_args(args, values) diff --git a/src/flake8/plugins/manager.py b/src/flake8/plugins/manager.py index 52b658c..80a9ef2 100644 --- a/src/flake8/plugins/manager.py +++ b/src/flake8/plugins/manager.py @@ -25,7 +25,7 @@ class Plugin(object): """Wrap an EntryPoint from setuptools and other logic.""" def __init__(self, name, entry_point): - """"Initialize our Plugin. + """Initialize our Plugin. :param str name: Name of the entry-point as it was registered with setuptools. @@ -97,7 +97,7 @@ class Plugin(object): @property def plugin(self): - """The loaded (and cached) plugin associated with the entry-point. + """Load and return the plugin associated with the entry-point. This property implicitly loads the plugin and then caches it. """ @@ -372,8 +372,7 @@ class PluginTypeManager(object): @staticmethod def _generate_call_function(method_name, optmanager, *args, **kwargs): - def generated_function(plugin): - """Function that attempts to call a specific method on a plugin.""" + def generated_function(plugin): # noqa: D105 method = getattr(plugin, method_name, None) if (method is not None and isinstance(method, collections.Callable)): |
