Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Details about known caveats of using multiple processes in pre-commit #9463

Merged
merged 2 commits into from
May 19, 2024

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented Feb 25, 2024

Type of Changes

Type
βœ“ πŸ“œ Docs

Description

Closes #9341

Closes #9465

Also fix the release doc for something that bit me during 3.1.0 release.

@Pierre-Sassoulas Pierre-Sassoulas added Documentation πŸ“— Skip news πŸ”‡ This change does not require a changelog entry labels Feb 25, 2024
@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as draft February 25, 2024 17:18
Copy link

codecov bot commented Feb 25, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 95.86%. Comparing base (978981d) to head (2b7100b).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #9463   +/-   ##
=======================================
  Coverage   95.86%   95.86%           
=======================================
  Files         174      174           
  Lines       18907    18907           
=======================================
  Hits        18125    18125           
  Misses        782      782           

Pierre-Sassoulas

This comment was marked as outdated.

Comment on lines 168 to 175
You can also do you own parallelization by launching pylint multiple time on subsets
of your files (like ``pre-commit`` with the default ``require_serial=false`` does).
Be aware though pylint should analyses all your code at once in order to best infer
the actual values that are passed in calls. If only some of the files are given pylint
might miss a particular value's type and produce inferior inference for the subset.
It can also be unexpectedly different when the file set changes because the new
slicing can change the inference. So, don't do this if correctness and determinism is
important to you.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if -j option is really better than a custom attempt at parallelization atm.

doc/faq.rst Outdated Show resolved Hide resolved
Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helpful context to add.

Added some copyedits ;)

doc/faq.rst Outdated Show resolved Hide resolved
doc/faq.rst Outdated Show resolved Hide resolved
doc/faq.rst Outdated Show resolved Hide resolved
doc/user_guide/installation/pre-commit-integration.rst Outdated Show resolved Hide resolved
doc/user_guide/installation/pre-commit-integration.rst Outdated Show resolved Hide resolved
doc/user_guide/installation/pre-commit-integration.rst Outdated Show resolved Hide resolved
@@ -19,6 +37,7 @@ as follows:
entry: pylint
language: system
types: [python]
require_serial: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’š

doc/user_guide/usage/run.rst Outdated Show resolved Hide resolved
…tiple processes

Refs microsoft/vscode-pylint#454
Also add known caveats for custom parallization.

Closes pylint-dev#9341

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
@Pierre-Sassoulas
Copy link
Member Author

I can't believe how many mistakes would be in the doc if you weren't reviewing πŸ₯²

@Pierre-Sassoulas Pierre-Sassoulas enabled auto-merge (rebase) May 19, 2024 14:31
@Pierre-Sassoulas Pierre-Sassoulas merged commit 3bf22d8 into pylint-dev:main May 19, 2024
26 checks passed
@Pierre-Sassoulas Pierre-Sassoulas deleted the doc-improvements branch May 19, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation πŸ“— Skip news πŸ”‡ This change does not require a changelog entry
Projects
None yet
2 participants