lint: silence deprecated flake8-mypy noise and bump mypy.ini to py3.1…#2369
Open
WatchTree-19 wants to merge 1 commit intopixie-io:mainfrom
Open
lint: silence deprecated flake8-mypy noise and bump mypy.ini to py3.1…#2369WatchTree-19 wants to merge 1 commit intopixie-io:mainfrom
WatchTree-19 wants to merge 1 commit intopixie-io:mainfrom
Conversation
pixie-io#1955) Signed-off-by: WatchTree-19 <119982314+WatchTree-19@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1955.
Two surgical config fixes for the mypy / flake8 linting setup under the Ubuntu noble linter image.
Root cause
The
T499errors are emitted byflake8-mypy, a flake8 plugin that wraps mypy with its own outdated args. The plugin has been deprecated since 2020 and is stuck on a Python 3.6 interpreter under noble. The plugin gets auto-loaded by flake8 because it's installed in the linter docker image..arclintalready declares a separate, dedicatedmypylinter that runsmypy --config-file=mypy.iniagainst the proper interpreter, so real mypy linting is happening regardless offlake8-mypy.Changes
.flake8rc: addT499to theignorelist with an explanatory comment matching the style of the existingN802/E999notes. Silences the broken plugin without touching the linter image.mypy.ini: bumppython_versionfrom3.8to3.12to match the project's actual Python target (WORKSPACEdeclarespython_version = "3.12").This intentionally does not block on or imply the broader linter-replacement work tracked in Replace arcanist with a support linting tool #1896.
Tested
Walked through the diff against the issue body's repro. Have not run
arc lintlocally - Pixie's Bazel + linter docker setup isn't in my dev env. Happy for a maintainer to confirm the noise stops on a real run.