| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Replace multiprocessing.pool with concurrent.futures.ProcessPoolExecutor to avoid deadlocks.
In a multiprocessing.pool, if a process terminates in a non-clean fashion
(for example, due to OOM or a segmentation fault), the pool will silently
replace said process, but the work that the process was supposed to do
will never be done, causing pylint to hang indefinitely.
The concurrent.futures.ProcessPoolExecutor will raise a
BrokenProcessPool exception in that case, avoiding the hang.
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
| |
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
(#6383)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fix the existing file so they have a notice.
No header for setup.py or examples or doc
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
And make ``current_name`` and ``current_file`` string-only
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Change tests for ``filepath`` changes
* Add pylint/typing.py and FileItem NamedTuple
* Use NamedTuple more efficiently
* Fix errors and tests after adding warning
* Add deprecation for future API change in Checker
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add typing to all calls to ``self.stats``
All checkers inherit from a baseclass which has a ``stats`` attribute.
This attribute has a fairly unmanageable type, but the current typing includes all variations of the attribute.
Other changes not directly related to ``self.stats`` are due to ``mypy``warnings.
This incorporate the feedback received in #4954
* Add ``CheckerStatistic`` class to ``pylint/typing``
* Guard `typing.Counter` import
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
| |
|
|
|
|
| |
* Fix link in license header
* Update link to astroid bump_changelog
|
| |
|
|
|
|
|
|
|
|
| |
* Implement consider-using-with check
* Fix or disable consider-using-with in codebase
* Fix ticket number in ChangeLog
* Move functional test for ``open()`` into separate testfile and exclude this test from running with PyPy
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This integrate the map/reduce functionality into lint.check_process().
We previously had `map` being invoked, here we add `reduce` support.
We do this by collecting the map-data by worker and then passing it to a
reducer function on the Checker object, if available - determined by
whether they confirm to the `mapreduce_checker.MapReduceMixin` mixin
interface or nor.
This allows Checker objects to function across file-streams when using
multiprocessing/-j2+. For example SimilarChecker needs to be able to
compare data across all files.
The tests, that we also add here, check that a Checker instance returns
and reports expected data and errors, such as error-messages and stats -
at least in a exit-ok (0) situation.
On a personal note, as we are copying more data across process
boundaries, I suspect that the memory implications of this might cause
issues for large projects already running with -jN and duplicate code
detection on. That said, given that it takes a long time to perform
lints of large code bases that is an issue for the [near?] future and
likely to be part of the performance work. Either way but let's get it
working first and deal with memory and perforamnce considerations later
- I say this as there are many quick wins we can make here, e.g.
file-batching, hashing lines, data compression and so on.
|
| |
|
|
|