Commit Graph

45 Commits

Author SHA1 Message Date
Daniël van Noord
d1a1f402e3 Change naming and imports of `_Arguments` 2022-04-04 11:08:07 +02:00
Daniël van Noord
968b513e4f
Remove broken `generate-man` option (#6126)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2022-04-02 14:01:36 +02:00
Daniël van Noord
b799cedfe3
Create `_ConfigurationFileParser` class (#6055)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2022-04-01 23:40:43 +02:00
Pierre Sassoulas
5324fecb32 [refactor] Cleanup of the USER_HOME variable
We keep it in the pylint.config API to not break downstreazm libraries.
2022-03-29 23:13:53 +02:00
Pierre Sassoulas
e0c346470b [refactor] Create an env_variable file in pylint.config 2022-03-29 23:13:53 +02:00
Daniël van Noord
0bc45e9037
Create an Argument class and allow convertion of optdict into them (#5584)
* Use config initialization of ``_ArgumentsManager``
* Allow ``BaseChecker`` to register on a ``_ArgumentsManager``
* Use the ``argparse`` config handler in ``logging.py`` and add tests
2022-03-29 14:44:27 +02:00
Pierre Sassoulas
49e666685e
Better error message when we cant write the crash files (#5987)
* Display the error correctly if we can't write a crash report. Also catch any exceptions.
2022-03-27 14:32:27 +02:00
Pierre Sassoulas
ec4a3f7f1e Add a pre-commit hook to check the copyright notice
Fix the existing file so they have a notice.
No header for setup.py or examples or doc
2022-03-24 13:06:15 +01:00
Pierre Sassoulas
9e0baf370a Simplify hard to maintain copyright notice
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.
2022-03-24 13:06:15 +01:00
Pierre Sassoulas
17d6926958 Move the find_pylintrc function in find_default_config_files.py 2021-10-26 06:48:45 +02:00
Pierre Sassoulas
b6597225fb Create a OLD_DEFAULT_PYLINT_HOME constants 2021-10-26 06:48:45 +02:00
Pierre Sassoulas
d3fd7f0f52 Create a DEFAULT_PYLINT_HOME constant and upgrade help text 2021-10-26 06:48:45 +02:00
Pierre Sassoulas
b6d154e8bb Put the environnement help directly where it makes sense 2021-10-26 06:48:45 +02:00
Daniël van Noord
16c09cb48a
Refactor `LinterStats` (#5074)
* 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>
2021-10-07 09:40:31 +02:00
Pierre Sassoulas
7add5d00ff Bump pylint to 2.11.0, update changelog 2021-09-16 18:19:49 +02:00
Daniël van Noord
e777697819
Fix bug with cache's parent directory not existing (#4988)
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
2021-09-10 09:49:22 +02:00
Daniël van Noord
66ffcbc4c5
Add `Consider-using-f-string` checker (#4796)
* 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>
2021-08-30 07:57:05 +02:00
Pierre Sassoulas
ad97338d8c
Migrate from `appdirs to platformdirs` (#4887)
* Migrate from appdirs to platformdirs

Closes #4886
2021-08-21 10:41:23 +02:00
Ashley Whetter
bf332820cb Bump pylint to 2.10.1, update changelog 2021-08-20 21:26:08 -07:00
Ashley Whetter
d701a979d9
pylint does not crash when PYLINT_HOME does not exist (#4884)
Closes #4883
2021-08-20 19:40:14 -07:00
Pierre Sassoulas
ea448b8905 Bump pylint to 2.10.0, update changelog 2021-08-20 22:58:03 +02:00
Pierre Sassoulas
303654c81c Prevent crash in CI environnement if we can't write in pylint's cache 2021-08-20 21:46:46 +02:00
Pierre Sassoulas
56fdadb1fa [PYLINT-HOME change] Less spam when using pylint in parallel
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.
2021-08-20 21:46:46 +02:00
Daniël van Noord
ea7f39e3ab
Add `format-string-without-interpolation` checker (#4794)
* 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>
2021-08-04 20:35:46 +02:00
Eisuke Kawashima
ae6cbd1062
Use XDG_CACHE_HOME for PYLINTHOME (#4661)
Closes #3878

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2021-07-28 22:02:54 +02:00
Pierre Sassoulas
aa688de05e Bump pylint to 2.9.3, update changelog 2021-07-01 14:54:36 +02:00
Marc Mueller
21290866a2
Fix copyright links (#4647)
* Fix link in license header
* Update link to astroid bump_changelog
2021-07-01 12:47:58 +02:00
Pierre Sassoulas
af52033971
Rename copying to license and upgrade the setup.cfg (#4338) 2021-04-11 15:29:34 +02:00
Pierre Sassoulas
391c8aa96c Update copyright notice with copyrite 2021-02-28 22:33:34 +01:00
Pierre Sassoulas
ac85223e5b Apply copyrite --contribution-threshold 2021-02-21 16:56:19 +01:00
Pierre Sassoulas
ee910755b9 Migrate from % syntax or bad format() syntax to fstring
We can do that in python 3.6
2021-02-21 15:36:16 +01:00
Pierre Sassoulas
5bed07eba9 Move from % string formatting syntax to f-string or .format() 2021-02-21 15:36:16 +01:00
Pierre Sassoulas
154718cf61 Remove the # coding, since PEP3120 the default is UTF8 2021-02-21 15:36:16 +01:00
Pierre Sassoulas
5728d82826 Add __all__ in __init__.py so all import are used 2020-09-22 22:47:05 +02:00
Pierre Sassoulas
74d5bcb352 Update formatting following black and isort update 2020-09-10 23:23:11 +02:00
hippo91
1f7c29c0b6 Sets up copyright 2020-08-20 18:40:19 +02:00
Pierre Sassoulas
8403b89615 Remove private functions from the API of pylint.config 2020-05-03 14:40:55 +02:00
Pierre Sassoulas
dc41698cfd Creating a file for ConfigurationMixin and helper functions 2020-05-03 14:40:55 +02:00
Pierre Sassoulas
ee678cb960 Creating a file for OptionProviderMixin and helper functions 2020-05-03 14:40:55 +02:00
Pierre Sassoulas
16d01daa27 Creating a file for OptionManagerMixin and helper functions 2020-05-03 14:40:55 +02:00
Pierre Sassoulas
f9baa0939e Creating a file for OptionParser and helper functions 2020-05-03 14:40:55 +02:00
Pierre Sassoulas
206018aa91 Creating a file for option and helper functions 2020-05-03 14:40:55 +02:00
Pierre Sassoulas
cce4e0578a Create a file for ManPageFormatter 2020-05-03 14:40:55 +02:00
Pierre Sassoulas
02a402e22b Create a file for find_default_config_files 2020-05-03 14:40:55 +02:00
Pierre Sassoulas
7802e7dd68 Move config.py into it's own package 2020-05-03 14:40:55 +02:00