Skip to content

Commit 1fc6c95

Browse files
committed
Fix check/mypy for dev.env.txt virtual environment
Problem: check/mypy passes in the mypy.env.txt environment, but fails on "unnecessary type ignore" in dev.env.txt virtual environment, because it installs IPython with its type information. Solution: Ignore IPython in type checks.
1 parent e4402ef commit 1fc6c95

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cirq-core/cirq/contrib/svg/svg_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pylint: disable=wrong-or-nonexistent-copyright-notice
2-
import IPython.display # type: ignore
2+
import IPython.display
33
import numpy as np
44
import pytest
55

dev_tools/conf/mypy.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ follow_imports = silent
1717
ignore_missing_imports = true
1818

1919
# Non-Google
20-
[mypy-sympy.*,matplotlib.*,proto.*,pandas.*,scipy.*,freezegun.*,mpl_toolkits.*,networkx.*,ply.*,astroid.*,pytest.*,_pytest.*,pylint.*,setuptools.*,qiskit.*,quimb.*,pylatex.*,filelock.*,sortedcontainers.*,tqdm.*,ruamel.*,absl.*,tensorflow_docs.*,ipywidgets.*, cachetools.*]
20+
[mypy-IPython.*,sympy.*,matplotlib.*,proto.*,pandas.*,scipy.*,freezegun.*,mpl_toolkits.*,networkx.*,ply.*,astroid.*,pytest.*,_pytest.*,pylint.*,setuptools.*,qiskit.*,quimb.*,pylatex.*,filelock.*,sortedcontainers.*,tqdm.*,ruamel.*,absl.*,tensorflow_docs.*,ipywidgets.*,cachetools.*]
2121
follow_imports = silent
2222
ignore_missing_imports = true
2323

0 commit comments

Comments
 (0)