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

PyCQA / pylint / 3550
92%
main: 95%

Build:
Build:
LAST BUILD BRANCH: maintenance/2.15.x
DEFAULT BRANCH: main
Ran 18 Oct 2019 09:37AM UTC
Jobs 2
Files 71
Run time 3min
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

pending completion
3550

push

travis-ci

PCManticore
Refactor file checking for a simpler parallel API (#3016)

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.

100 of 100 new or added lines in 4 files covered. (100.0%)

10700 of 11959 relevant lines covered (89.47%)

1.79 hits per line

Jobs
ID Job ID Ran Files Coverage
5 3550.5 (TOXENV=py35) 18 Oct 2019 09:37AM UTC 0
89.47
Travis Job 3550.5
8 3550.8 (TOXENV=py38) 18 Oct 2019 09:41AM UTC 0
90.01
Travis Job 3550.8
Source Files on build 3550
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3550
  • 8babeffd on github
  • Prev Build on master (#3543)
  • Next Build on master (#3551)
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