-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests verifying TypeAnnotationsVisitor current behaviors (#502)
* Add tests to verify that LibCST handles string annotations. This is an important property for certain use cases, so it makes sense to verify it in tests so that we can safely depend on it. At present, the reason we want to be able to rely on this is: - at the moment, imports added by infer can make pysa traces hard to understand, because the line numbers are off - if we add the ability to use fully-qualified string annotations for the stubs from infer, then we can do so without adding any import lines and pyre will understand the types. * ApplyTypeAnnotations: add unit test of how import statments are merged Add a unit test illustrating how the codemod handles various cases of import statments in the stub file. Explicitly call out each of the unsupported patterns: - bare imports (we probably should support this) - relative imports (we probably should support this) star imports (we probably don't want to support this) * Add .python-version to .gitignore This will be helpful for anyone using pyenv (I accidentally committed my python version file in a draft branch).
- Loading branch information
Showing
2 changed files
with
96 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ build/ | |
.coverage | ||
.hypothesis/ | ||
.pyre_configuration | ||
.python-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters