Skip to content

Fix pylint false positives for ThreadPoolExecutor#4244

Merged
xrmx merged 11 commits intoopen-telemetry:mainfrom
srikaaviya:fix-threadpool-pylint
Apr 14, 2026
Merged

Fix pylint false positives for ThreadPoolExecutor#4244
xrmx merged 11 commits intoopen-telemetry:mainfrom
srikaaviya:fix-threadpool-pylint

Conversation

@srikaaviya
Copy link
Copy Markdown
Contributor

Description

This PR changes the concurrent.futures import style in three files to bypass a known no-name-in-module pylint parsing bug introduced when adding Python 3.14 support.

By using import concurrent.futures and fully qualifying concurrent.futures.ThreadPoolExecutor and concurrent.futures.Future, we cleanly resolve the false positive without needing any # pylint: disable comments or global config overrides.

Fixes #4199

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The official tox linting suites passed successfully:

Does This PR Require a Core Repo Change?

No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs - (N/A - purely internal linting fix)
  • Unit tests - (N/A - fixing lint false positive)
  • Documentation - (N/A)

@srikaaviya srikaaviya requested a review from a team as a code owner February 20, 2026 23:58
@srikaaviya srikaaviya force-pushed the fix-threadpool-pylint branch from 3d58728 to bdd972d Compare February 23, 2026 22:17
@xrmx xrmx moved this to Ready for review in Python PR digest Feb 24, 2026
@xrmx xrmx moved this from Ready for review to Reviewed PRs that need fixes in Python PR digest Feb 24, 2026
Copy link
Copy Markdown
Contributor

@xrmx xrmx left a comment

Choose a reason for hiding this comment

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

I don't think this is the right way to fix this. We should fix all the issue we have with a newer pylint version and then remove the comments.

@JWinermaSplunk
Copy link
Copy Markdown

I agree with @xrmx in that we should bump the pylint version instead of using the fully qualified names.

@srikaaviya srikaaviya force-pushed the fix-threadpool-pylint branch from bdd972d to 59e2617 Compare February 24, 2026 23:05
@srikaaviya
Copy link
Copy Markdown
Contributor Author

srikaaviya commented Feb 24, 2026

@xrmx @DylanRussell @JWinermaSplunk I bumped pylint to 4.0.5, as anticipated, the upgrade surfaces 41 lint job failures across the repo. Should I address them in this PR? What would you recommend?

@xrmx
Copy link
Copy Markdown
Contributor

xrmx commented Feb 26, 2026

@xrmx @DylanRussell @JWinermaSplunk I bumped pylint to 4.0.5, as anticipated, the upgrade surfaces 41 lint job failures across the repo. Should I address them in this PR? What would you recommend?

I would start by changing the pylint configuration to:

[DESIGN]
max-positional-arguments=10

And then re-evaluate what's left. I see there are files with 12 or even 18 occurrences but there would probably good to add a local comment to disable the warnings.

@xrmx
Copy link
Copy Markdown
Contributor

xrmx commented Mar 2, 2026

@srikaaviya I've opened a PR to fix a bunch of reported issues here #4272 , I would suggest to wait for that to get in and then do the required fixes for the bump in this PR.

@srikaaviya
Copy link
Copy Markdown
Contributor Author

srikaaviya commented Mar 2, 2026

@srikaaviya I've opened a PR to fix a bunch of reported issues here #4272 , I would suggest to wait for that to get in and then do the required fixes for the bump in this PR.

Sure, I'll wait until #4272 is merged.

@xrmx
Copy link
Copy Markdown
Contributor

xrmx commented Mar 12, 2026

@srikaaviya I've merged #4272

…l-arguments=10, Add pylint: disable=too-many-positional-arguments to functions that legitimately exceed the limit
Copy link
Copy Markdown
Member

@emdneto emdneto left a comment

Choose a reason for hiding this comment

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

it seems there are more lint cases to fix

@xrmx
Copy link
Copy Markdown
Contributor

xrmx commented Mar 16, 2026

it seems there are more lint cases to fix

baggage should be ignored, openai-agents is the very same error as these, for botocore I guess removing the return is enough.

@srikaaviya
Copy link
Copy Markdown
Contributor Author

@xrmx I have addressed the changes. Please let me know if there's anything else!

@xrmx xrmx self-requested a review April 10, 2026 08:53
@xrmx xrmx requested a review from emdneto April 14, 2026 12:45
@github-project-automation github-project-automation bot moved this from Reviewed PRs that need fixes to Approved PRs in Python PR digest Apr 14, 2026
@xrmx xrmx merged commit dcf86d0 into open-telemetry:main Apr 14, 2026
750 checks passed
@github-project-automation github-project-automation bot moved this from Approved PRs to Done in Python PR digest Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Fix pylint false positives for ThreadPoolExecutor

8 participants