Fix pylint false positives for ThreadPoolExecutor#4244
Conversation
3d58728 to
bdd972d
Compare
xrmx
left a comment
There was a problem hiding this comment.
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.
|
I agree with @xrmx in that we should bump the pylint version instead of using the fully qualified names. |
bdd972d to
59e2617
Compare
|
@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: 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. |
|
@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. |
|
@srikaaviya I've merged #4272 |
…l-arguments=10, Add pylint: disable=too-many-positional-arguments to functions that legitimately exceed the limit
emdneto
left a comment
There was a problem hiding this comment.
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 |
…, add openai-agents disable
…k line in .pylintrc
|
@xrmx I have addressed the changes. Please let me know if there's anything else! |
* Bump pylint to 4.0.5 to fix Python 3.14 concurrent.futures false positives * Fix too-many-positional-arguments pylint failures - Add max-positional-arguments=10, Add pylint: disable=too-many-positional-arguments to functions that legitimately exceed the limit * Bump max-positional-arguments to 12 and remove unnecessary disable comments * Address review comments: fix CHANGELOG, remove stale pylintrc comment, add openai-agents disable * Fix formatting: restore blank line in CHANGELOG and remove extra blank line in .pylintrc * Update processor.py * Update test_botocore_bedrock.py --------- Co-authored-by: Riccardo Magliocchetti <[email protected]>
* linting fix * Updating changelog * Updating changelog PR number * Removing embedding events emission * Refatoring and adding input token metric for Embedding invocation * Merging and removing unused import * build(deps): bump aiohttp from 3.13.3 to 3.13.4 (#4386) --- updated-dependencies: - dependency-name: aiohttp dependency-version: 3.13.4 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Revert "Build list of required jobs in generate-workflow (#4326)" (#4413) This reverts commit 22879d6. Now that we have just one job to check we don't need to build the list anymore. * Drop Python 3.9 support (#4412) * Drop Python 3.9 support Signed-off-by: emdneto <[email protected]> * generate-workflows Signed-off-by: emdneto <[email protected]> * fixes Signed-off-by: emdneto <[email protected]> * remove extra reference to pypy310 Signed-off-by: emdneto <[email protected]> * changelog Signed-off-by: emdneto <[email protected]> * fix flask tests Signed-off-by: emdneto <[email protected]> * fix google-genai tests Signed-off-by: emdneto <[email protected]> * fix google-genai tests Signed-off-by: emdneto <[email protected]> * fix Signed-off-by: emdneto <[email protected]> * remove unused _ensure_gzip_single_response Signed-off-by: emdneto <[email protected]> --------- Signed-off-by: emdneto <[email protected]> Co-authored-by: Riccardo Magliocchetti <[email protected]> * Add AGENTS.md with project structure and commands (#4233) * Add CLAUDE.md with project structure and commands * Add AGENTS.md symlink to CLAUDE.md * Move guidance to AGENTS.md and address review feedback - Move main content from CLAUDE.md to AGENTS.md so all AI agents (not only Claude) pick up the guidance; CLAUDE.md now just references it via `@AGENTS.md`. - Add general rules, PR scoping, and `Assisted-by:` commit trailer guidance (inspired by the Collector's AGENTS.md). - Clarify that only instrumentation packages live under `src/opentelemetry/instrumentation/{name}/`; other package types use their own namespace. --------- Co-authored-by: Riccardo Magliocchetti <[email protected]> * scripts: drop update_sha (#4430) It's buggy and unused. * Fix pylint false positives for ThreadPoolExecutor (#4244) * Bump pylint to 4.0.5 to fix Python 3.14 concurrent.futures false positives * Fix too-many-positional-arguments pylint failures - Add max-positional-arguments=10, Add pylint: disable=too-many-positional-arguments to functions that legitimately exceed the limit * Bump max-positional-arguments to 12 and remove unnecessary disable comments * Address review comments: fix CHANGELOG, remove stale pylintrc comment, add openai-agents disable * Fix formatting: restore blank line in CHANGELOG and remove extra blank line in .pylintrc * Update processor.py * Update test_botocore_bedrock.py --------- Co-authored-by: Riccardo Magliocchetti <[email protected]> * feat(util-genai): refactor and make API smaller and more user-friendly (#4391) * Refactor public API on GenAI utils * more lint * review feedback * update tests to use named params * address some of the comments * up * fix failing checks and clean up imports * lint * lint * fix lint * replace @deprecated with docstring info to avoid warnings for users * up * common code for context manager * Adding metrics call for Embedding type after refactoring * Updating metrics tests with embedding * Adding fix for markdown-link-check --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: emdneto <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Riccardo Magliocchetti <[email protected]> Co-authored-by: Emídio Neto <[email protected]> Co-authored-by: Marcelo Trylesinski <[email protected]> Co-authored-by: Sri Kaaviya <[email protected]> Co-authored-by: Liudmila Molkova <[email protected]>
Description
This PR changes the
concurrent.futuresimport style in three files to bypass a knownno-name-in-modulepylint parsing bug introduced when adding Python 3.14 support.By using
import concurrent.futuresand fully qualifyingconcurrent.futures.ThreadPoolExecutorandconcurrent.futures.Future, we cleanly resolve the false positive without needing any# pylint: disablecomments or global config overrides.Fixes #4199
Type of change
How Has This Been Tested?
The official tox linting suites passed successfully:
Does This PR Require a Core Repo Change?
No.
Checklist: