LibCST/libcst/codemod
Steven Troxler 3009ec9e36
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).
2021-08-06 08:55:47 -07:00
..
commands Pin linters (#412) 2020-11-03 18:28:05 +00:00
tests Upgrade dev tools (Black/Flake8/isort) and read install requirements from requirements.txt (#380) 2020-08-31 10:44:55 -07:00
visitors Add tests verifying TypeAnnotationsVisitor current behaviors (#502) 2021-08-06 08:55:47 -07:00
__init__.py [typing] enable Pyre strict mode by default (#313) 2020-06-12 18:24:18 -07:00
_cli.py fix codemodding on windows (#495) 2021-07-05 12:27:41 +01:00
_codemod.py Add FullyQualifiedNameProvider (#465) 2021-03-26 17:15:57 +00:00
_command.py Fix pyre error: kwonlydefaults is Optional 2020-08-07 11:15:21 -07:00
_context.py [typing] enable Pyre strict mode by default (#313) 2020-06-12 18:24:18 -07:00
_dummy_pool.py add missing license header (#421) 2020-11-19 07:34:26 +08:00
_runner.py [typing] enable Pyre strict mode by default (#313) 2020-06-12 18:24:18 -07:00
_testing.py [typing] enable Pyre strict mode by default (#313) 2020-06-12 18:24:18 -07:00
_visitor.py [typing] enable Pyre strict mode by default (#313) 2020-06-12 18:24:18 -07:00