• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PyCQA / pylint / 3546 / 10
90%
main: 95%

Build:
Build:
LAST BUILD BRANCH: maintenance/2.15.x
DEFAULT BRANCH: main
Ran 17 Oct 2019 02:23PM UTC
Files 71
Run time 6s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Oct 2019 02:07PM UTC coverage: 89.205% (+0.1%) from 89.057%
TOXENV=pypy

Pull #3016

travis-ci

web-flow
Refactor file checking for a simpler parallel API

This change prepares the code for enabling Prospector to take advantage
of running PyLint parallel.

Iterating files is moved into generator (_iterate_file_descrs) so that
parallel checking can use the same implementation (_check_file) just
by providing different kind of generator that reads the files from parent
process.

The refactoring removes code duplication that existed in PyLinter._do_check
method; checking module content from stdin had identical implementation to
checking content from a source file.

Made PyLinter.expand_files a private method.

The previous implementation of parallel linting created new PyLinter
objects in the worker (child) process causing failure when running under
Prospector because Prospector uses a custom PyLinter class
(a class inherited from PyLinter)
and PyLint naturally just creates PyLinter object. This caused linting to
fail because there is options for Prospector's IndentChecker which was not
created in the worker process.

The new implementation passes the original PyLinter object into workers
when the workers are created. See https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

Note that as Windows uses spawn method by default, PyLinter object (and
its) members need to be pickleable from now on with the exception being
PyLinter.reporter which is not passed to child processes.

The performance has remained about the same based on quick tests done with
Django project containing about 30 000 lines of code; with the old
implementation linting took 26-28 seconds with 8 jobs on quad core i7 and
24-27 seconds with the new implementation.
Pull Request #3016: Refactor file checking to allow parallel linting in Prospector

10668 of 11959 relevant lines covered (89.2%)

0.89 hits per line

Source Files on job 3546.10 (TOXENV=pypy)
  • Tree
  • List 0
  • Changed 4
  • Source Changed 4
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2943
  • Travis Job 3546.10
  • 4bc59799 on github
  • Prev Job for TOXENV=pypy on parallel (#3543.10)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc