Skip to content

Commit 0d7d528

Browse files
authored
Remove mypy --next (#5763)
1 parent c7234ae commit 0d7d528

File tree

4 files changed

+11
-58
lines changed

4 files changed

+11
-58
lines changed

.github/workflows/ci.yml

-13
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,6 @@ jobs:
6565
run: pip install -r dev_tools/requirements/mypy.env.txt
6666
- name: Type check
6767
run: check/mypy
68-
mypy-next:
69-
name: Type check (next)
70-
runs-on: ubuntu-20.04
71-
steps:
72-
- uses: actions/checkout@v2
73-
- uses: actions/setup-python@v1
74-
with:
75-
python-version: '3.8'
76-
architecture: 'x64'
77-
- name: Install mypy
78-
run: pip install -r dev_tools/requirements/mypy.env.txt
79-
- name: Type check (for logging only)
80-
run: check/mypy --next || true
8168
changed_files:
8269
name: Changed files test
8370
runs-on: ubuntu-20.04

check/mypy

+2-8
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,12 @@
1111
cd "$(dirname "${BASH_SOURCE[0]}")"
1212
cd "$(git rev-parse --show-toplevel)"
1313

14-
config_file='mypy.ini'
15-
for arg in "$@"; do
16-
if [[ "${arg}" == "--next" ]]; then
17-
config_file='mypy-next.ini'
18-
shift
19-
fi
20-
done
14+
CONFIG_FILE='mypy.ini'
2115

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

2418
echo -e -n "\033[31m"
25-
mypy --config-file=dev_tools/conf/$config_file "$@" $CIRQ_PACKAGES dev_tools examples
19+
mypy --config-file=dev_tools/conf/$CONFIG_FILE "$@" $CIRQ_PACKAGES dev_tools examples
2620
result=$?
2721
echo -e -n "\033[0m"
2822

dev_tools/conf/mypy-next.ini

-27
This file was deleted.

dev_tools/conf/mypy.ini

+9-10
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@ follow_imports = silent
77
ignore_missing_imports = true
88

99
# 3rd-party libs for which we don't have stubs
10-
[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.*]
10+
11+
# Google
12+
[mypy-google.api_core.*,google.auth.*,google.colab.*,google.protobuf.text_format.*,google.cloud.*]
13+
follow_imports = silent
14+
ignore_missing_imports = true
15+
16+
# Non-Google
17+
[mypy-sympy.*,matplotlib.*,proto.*,pandas.*,scipy.*,freezegun.*,mpl_toolkits.*,networkx.*,ply.*,astroid.*,pytest.*,_pytest.*,pylint.*,setuptools.*,qiskit.*,quimb.*,pylatex.*,filelock.*,sortedcontainers.*,tqdm.*]
1118
follow_imports = silent
1219
ignore_missing_imports = true
1320

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

1922
# Treat symbols imported from Google's protobuf library as type Any.
20-
# This supresses errors due to attributes not known to typeshed,
23+
# This suppresses errors due to attributes not known to typeshed,
2124
# e.g. Descriptor._options.
2225
[mypy-google.protobuf.*]
2326
follow_imports = skip
2427
follow_imports_for_stubs = true
25-
26-
# ruamel is a downstream dependency of cirq-rigetti through pyquil.
27-
[mypy-ruamel.*]
28-
ignore_missing_imports = true

0 commit comments

Comments
 (0)