Skip to content

Commit

Permalink
Remove pytype lint check. (#17551)
Browse files Browse the repository at this point in the history
This isn't providing enough value, triggers false positives, and we want
to switch to [mypy](https://mypy-lang.org/) (as a pre-commit check, see
#17430).

Could also remove `pytype: disable=` annotations and related comments.
  • Loading branch information
ScottTodd authored Jun 7, 2024
1 parent d68a859 commit 2baf6c3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 102 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,6 @@ jobs:
- name: Running pre-commit
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

pytype:
runs-on: ubuntu-20.04
steps:
- name: Checking out repository
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Setting up python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
- name: Fetching Base Branch
# We have to explicitly fetch the base branch as well
run: git fetch --no-tags --prune --depth=1 origin "${GITHUB_BASE_REF?}:${GITHUB_BASE_REF?}"
- name: Install pytype
run: python3 -m pip install pytype
- name: Run pytype on changed files
run: ./build_tools/pytype/check_diff.sh "${GITHUB_BASE_REF?}"

generated_cmake_files:
runs-on: ubuntu-20.04
steps:
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ repos:
language: fail
files: "BUILD$"

# TODO(scotttodd): mypy type checking for Python (https://mypy-lang.org/)

# TODO(scotttodd): enable these checks when they work on Windows
# the generator scripts use \ on Windows instead of /

Expand Down
84 changes: 0 additions & 84 deletions build_tools/pytype/check_diff.sh

This file was deleted.

3 changes: 0 additions & 3 deletions build_tools/scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ echo "***** buildifier *****"
${scripts_dir}/run_buildifier.sh
git diff --exit-code

echo "***** pytype *****"
./build_tools/pytype/check_diff.sh

echo "***** Generates CMake files *****"
./build_tools/scripts/generate_cmake_files.sh
git add -A
Expand Down

0 comments on commit 2baf6c3

Please sign in to comment.