Skip to content

Convert parallel setting to int - #9869

Open
radarhere wants to merge 1 commit into
python-pillow:mainfrom
radarhere:parallel
Open

Convert parallel setting to int#9869
radarhere wants to merge 1 commit into
python-pillow:mainfrom
radarhere:parallel

Conversation

@radarhere

@radarhere radarhere commented Aug 12, 2026

Copy link
Copy Markdown
Member

LInt has started failing - https://github.com/python-pillow/Pillow/actions/runs/31563474566/job/94010414409#step:6:22

setup.py:383: error: Incompatible types in assignment (expression has type
"str | None", variable has type "int | None")  [assignment]
            self.parallel = configuration.get("parallel", [None])[-1]
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error in 1 file (checked 303 source files)

Comment thread setup.py
Comment on lines +383 to +384
if "parallel" in configuration:
self.parallel = int(configuration["parallel"][-1])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Likely caused by today's https://pypi.org/project/types-setuptools/84.0.0.20260812/


We already have this value at:

default = int(configuration.get("parallel", ["0"])[-1])

Shall we rename that to something like parallel_default and:

Suggested change
if "parallel" in configuration:
self.parallel = int(configuration["parallel"][-1])
self.parallel = parallel_default

Or use the same pattern as there:

Suggested change
if "parallel" in configuration:
self.parallel = int(configuration["parallel"][-1])
self.parallel = int(configuration.get("parallel", ["0"])[-1])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants