-
Notifications
You must be signed in to change notification settings - Fork 428
Feature/issue 1399 switch to pyrefly #1433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
788ba63
6d4ef5a
2a2ce76
688bdd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "problemMatcher": [ | ||
| { | ||
| "owner": "typecheck", | ||
| "severity": "error", | ||
| "pattern": [ | ||
| { | ||
| "regexp": "^(?:ERROR|WARN(?:ING)?)\\s+([^:]+):(\\d+):(\\d+)(?:-\\d+)?:\\s+(.*?)(?:\\s+\\[(\\S+)\\])?$", | ||
| "file": 1, | ||
| "line": 2, | ||
| "column": 3, | ||
| "message": 4, | ||
| "code": 5 | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,19 +14,18 @@ | |
| # limitations under the License. | ||
|
|
||
| ################################################################################ | ||
| # Runs mypy on the repository starting from the root. | ||
| # Deprecated wrapper that forwards to check/typecheck (Pyrefly). | ||
| # | ||
| # Usage: | ||
| # check/mypy [--flags] | ||
| ################################################################################ | ||
|
|
||
| echo "Warning: 'check/mypy' is deprecated." \ | ||
| "Please use 'check/typecheck' instead." >&2 | ||
| echo >&2 | ||
|
|
||
| # Get the working directory to the repo root. | ||
| cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" || exit 1 | ||
| cd "$(git rev-parse --show-toplevel)" || exit 1 | ||
|
|
||
| echo -e -n "\033[31m" | ||
| mypy "$@" . | ||
| result=$? | ||
| echo -e -n "\033[0m" | ||
|
|
||
| exit ${result} | ||
| exec check/typecheck "$@" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mhucka Do we want to fully remove mypy support immediately? We could alternatively leave it in for now and just print the deprecation warning if anyone runs it. This would make it easy to run both and ensure that pyrefly isn't lowering our coverage for now. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #!/usr/bin/env bash | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| ################################################################################ | ||
| # Runs type checking on the repository using Pyrefly. | ||
| # | ||
| # Usage: | ||
| # check/typecheck [--flags] | ||
| ################################################################################ | ||
|
|
||
| # Get the working directory to the repo root. | ||
| cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" || exit 1 | ||
| cd "$(git rev-parse --show-toplevel)" || exit 1 | ||
|
|
||
| # Ensure terminal color is reset even if interrupted. | ||
| trap 'echo -e -n "\033[0m"' EXIT | ||
|
|
||
| echo -e -n "\033[31m" | ||
| pyrefly check "$@" | ||
| result=$? | ||
| exit ${result} | ||
|
rosspeili marked this conversation as resolved.
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| pyrefly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect we don't need the matcher here since pyrefly has a
--output-format githubflag. If so, you could delete the typecheck.json.