* Use config initialization of ``_ArgumentsManager``
* Allow ``BaseChecker`` to register on a ``_ArgumentsManager``
* Use the ``argparse`` config handler in ``logging.py`` and add tests
git is the source of truth for the copyright, copyrite (the tool)
was taking exponentially longer with each release, and it's
polluting the code with sometime as much as 50 lines of names.
* Refactor ``self.stats`` on linter and checker
This adds a new class ``LinterStats`` which is used to store all
kinds of stats during a run of ``pylint``. Tests have been changed
slightly to be able to use the new class.
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
By changing the function used to create the cache from ``os.mkdir``
to ``os.makedirs`` we now handle non-existing parent directories
correctly.
This closes#4900
* Add ``consider-using-f-string`` checker
This adds a checker for normal strings which are formatted
with ``.format()`` or '%'.
The message is a convention to nudge users towards using f-strings.
This closes#3592
* Update pylint code to use f-strings
After adding `consider-using-f-strings` the codebase showed numerous
cases of formatting which could be f-strings.
This commit changes most of these to become f-strings, or adds ignores.
* Apply suggestions from code review
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
The spam prevention is due to pylint being used in parallel by
pre-commit, and the message being spammy in this context
Also if you work with old version of pylint that recreate the
old pylint home, you can get the old message for a long time.
* Add ``format-string-without-interpolation`` checker
This adds a checker that checks strings with '%' or format() applied to them.
If no variables to be replaced are found the warning is emitted.
Closes#4042
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>