-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area/mypykind/healthFor CI/testing/release process/refactoring/technical debt itemsFor CI/testing/release process/refactoring/technical debt itemstriage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on
Description
There was a question in cirq sync today about type annotations, which makes me think we should add some documentation about how we write type annotations in cirq. Some things to address:
- When to use a string in type annotations versus not.
- How to use
if TYPE_CHECKING
. - When to use top-level
'cirq.Foo'
annotations versus a specific import from another module.
We might also want to investigate ways to have lints on type annotations because we want to prefer top-level 'cirq.Foo'
annotations but we have lots of old code that doesn't do this, and no enforcement of annotation style on new code either.
Metadata
Metadata
Assignees
Labels
area/mypykind/healthFor CI/testing/release process/refactoring/technical debt itemsFor CI/testing/release process/refactoring/technical debt itemstriage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on