Skip to content

Comments

Fix pylint false positives for ThreadPoolExecutor#4244

Open
srikaaviya wants to merge 1 commit intoopen-telemetry:mainfrom
srikaaviya:fix-threadpool-pylint
Open

Fix pylint false positives for ThreadPoolExecutor#4244
srikaaviya wants to merge 1 commit intoopen-telemetry:mainfrom
srikaaviya:fix-threadpool-pylint

Conversation

@srikaaviya
Copy link

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 @xrmx's Python PR digest Feb 24, 2026
@xrmx xrmx moved this from Ready for review to Reviewed PRs that need fixes in @xrmx's Python PR digest Feb 24, 2026
Copy link
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.


# from concurrent.futures import ( # pylint: disable=no-name-in-module; TODO #4199
# ThreadPoolExecutor,
# )
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this commented out ? can we just remove it ? here and everywhere else ?

@JWinermaSplunk
Copy link

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
Author

@xrmx @DylanRussell Thanks for the feedback! I've reverted the import workarounds and bumped pylint to 4.0.5 in dev-requirements.txt which resolves the false positives natively on Python 3.14. I also removed the comments and deprecated suggestion-mode option from .pylintrc which was dropped in Pylint 4.

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

Labels

None yet

Projects

Status: Reviewed PRs that need fixes

Development

Successfully merging this pull request may close these issues.

Fix pylint false positives for ThreadPoolExecutor

5 participants