Skip to content

Commit

Permalink
Remove mypy --next (#5763)
Browse files Browse the repository at this point in the history
  • Loading branch information
dabacon authored Jul 14, 2022
1 parent c7234ae commit 0d7d528
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 58 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,6 @@ jobs:
run: pip install -r dev_tools/requirements/mypy.env.txt
- name: Type check
run: check/mypy
mypy-next:
name: Type check (next)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.8'
architecture: 'x64'
- name: Install mypy
run: pip install -r dev_tools/requirements/mypy.env.txt
- name: Type check (for logging only)
run: check/mypy --next || true
changed_files:
name: Changed files test
runs-on: ubuntu-20.04
Expand Down
10 changes: 2 additions & 8 deletions check/mypy
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
cd "$(dirname "${BASH_SOURCE[0]}")"
cd "$(git rev-parse --show-toplevel)"

config_file='mypy.ini'
for arg in "$@"; do
if [[ "${arg}" == "--next" ]]; then
config_file='mypy-next.ini'
shift
fi
done
CONFIG_FILE='mypy.ini'

CIRQ_PACKAGES=$(env PYTHONPATH=. python dev_tools/modules.py list --mode package-path)

echo -e -n "\033[31m"
mypy --config-file=dev_tools/conf/$config_file "$@" $CIRQ_PACKAGES dev_tools examples
mypy --config-file=dev_tools/conf/$CONFIG_FILE "$@" $CIRQ_PACKAGES dev_tools examples
result=$?
echo -e -n "\033[0m"

Expand Down
27 changes: 0 additions & 27 deletions dev_tools/conf/mypy-next.ini

This file was deleted.

19 changes: 9 additions & 10 deletions dev_tools/conf/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,21 @@ follow_imports = silent
ignore_missing_imports = true

# 3rd-party libs for which we don't have stubs
[mypy-apiclient.*,freezegun.*,matplotlib.*,mpl_toolkits,multiprocessing.dummy,oauth2client.*,pandas.*,proto.*,pytest.*,scipy.*,sortedcontainers.*,setuptools.*,pylatex.*,networkx.*,qiskit.*,pypandoc.*,ply.*,_pytest.*,google.api.*,google.api_core.*,grpc.*,google.auth.*,google.oauth2.*,google.protobuf.text_format.*,quimb.*,pyquil.*,google.cloud.*,filelock.*,codeowners.*,tqdm.*,importlib_metadata.*,google.colab.*,IPython.*,astroid.*,pylint.*]

# Google
[mypy-google.api_core.*,google.auth.*,google.colab.*,google.protobuf.text_format.*,google.cloud.*]
follow_imports = silent
ignore_missing_imports = true

# Non-Google
[mypy-sympy.*,matplotlib.*,proto.*,pandas.*,scipy.*,freezegun.*,mpl_toolkits.*,networkx.*,ply.*,astroid.*,pytest.*,_pytest.*,pylint.*,setuptools.*,qiskit.*,quimb.*,pylatex.*,filelock.*,sortedcontainers.*,tqdm.*]
follow_imports = silent
ignore_missing_imports = true

# There was no type information before numpy 1.20, so there are numpy mypy issues in the codebase
[mypy-numpy.*]
follow_imports = skip
follow_imports_for_stubs = true

# Treat symbols imported from Google's protobuf library as type Any.
# This supresses errors due to attributes not known to typeshed,
# This suppresses errors due to attributes not known to typeshed,
# e.g. Descriptor._options.
[mypy-google.protobuf.*]
follow_imports = skip
follow_imports_for_stubs = true

# ruamel is a downstream dependency of cirq-rigetti through pyquil.
[mypy-ruamel.*]
ignore_missing_imports = true

0 comments on commit 0d7d528

Please sign in to comment.