Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cirq-core/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ numpy~=1.16
pandas
sortedcontainers~=2.0
scipy
# TODO: unpin once #5058 is resolved
sympy<1.10
sympy
typing_extensions
tqdm
3 changes: 2 additions & 1 deletion dev_tools/conf/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ follow_imports_for_stubs = true

#Adding "sympy.* or mypy-sympy to the above list (3rd-party libs for which we don't have stubs) doesn't ignore "cannot find module 'sympy' error
[mypy-sympy.*]
ignore_missing_imports = True
follow_imports = skip
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it makes the type checking less robust for all the packages that do have good types. It feels like we are losing a lot for one packages problems?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only skips following imports to the sympy package, which I think is basically equivalent to the status quo since sympy <= 1.9 does not ship with type annotations. If we change this to follow_imports=silent we end up with 475 type errors; it'd be good to start whittling those down, but not clear to me that this needs to happen before 1.0.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I misread what this does, thanks

ignore_missing_imports = true

# Treat symbols imported from Google's protobuf library as type Any.
# This supresses errors due to attributes not known to typeshed,
Expand Down