Extension
Flake8 extension for checking author, copyright, and license.
| author: | Joe Joyce <joe@decafjoe.com> |
| copyright: | Copyright (c) Joe Joyce and contributors, 2016-2019. |
| license: | BSD |
-
flake8_ownership.__version__ = '2.0.1'
Version of the extension.
-
flake8_ownership.author_re
Regex that matches the :author: line.
-
flake8_ownership.copyright_re
Regex that matches the :copyright: line.
-
flake8_ownership.license_re
Regex that matches the :license: line.
-
class
flake8_ownership.Checker(tree, filename)[source]
Flake8 checker class that checks for author, copyright, and license.
-
classmethod
add_options(parser)[source]
Add –author-re, –copyright-re, and –license-re options.
-
author_re = None
List of regexes of valid :author: values.
-
codes = 'O10'
Prefix for the error codes emitted from this class.
-
copyright_re = None
List of regexes of valid :copyright: values.
-
license_re = None
List of regexes of valid :license: values.
-
name = 'flake8_ownership'
Name of the checker.
-
classmethod
parse_options(options)[source]
Process the supplied configuration.
This populates the author_re, copyright_re, and
license_re attributes. For each configuration option, this
substitutes <COMMA> and <YEAR> as appropriate, then compiles
each regex.
-
run()[source]
Run the Checker on a filename.
-
version = '2.0.1'
Version of the checker.