Jimmy Lai
Jimmy Lai
## Summary This is for reproducing a bug of CollapseIsinstanceChecksRule. It rewrites `elif` as `if` which is wrong. CC @isidentical ## Test Plan `tox -e py37 fixit.tests.CollapseIsinstanceChecksRule` Output: ``` F.......................
Improve generate_pyre_fixtures by removing get_rules_package_parser and integrate to the unified CLI
Improve generate_pyre_fixtures by removing get_rules_package_parser and integrate to the unified CLI. 1. get_rules_package_parser doesn't seem useful. 2. all CLI should be move to the new unified one for consistency and...
- UseAttributeAccessRule - UseAttributeValueAssignRule - NoInheritFromNamedTuple - NoUnnecessaryFormatString - SortedAttributesRule - UnwrapStringTypeAnnotationRule - MissingAnnotationLintRule - UseFstringRule - DoNotShadowPackagesRule - DataclassExplicitFrozenRule - UseAssertInRule
Some rules are replacement of Flake8 rules, we should silence them automatically when the rule is enabled to avoid duplicated suggestions. - ComparePrimitivesByEqualRule replaces F632 - CompareSingletonPrimitivesByIsRule replaces E711 and...
Integrate Fixit into a VSCode plugin (and potentially any other IDE), so developer can easily install it and use it on VSCode. Fixit can be run automatically when developers save...
Context: https://github.com/Instagram/Fixit/pull/67/files
Example: ``` In [1]: code = '".".join(["a", "b"])' In [2]: import libcst as cst In [3]: from libcst import MetadataWrapper In [4]: wraper = MetadataWrapper(module=cst.parse_module(code)) In [5]: from libcst.metadata import...
In some lint or codemod use cases, we want to know the super classes of a class to see if it's inherited from a specific class in order to enforce...
`f"{a or ""}"` this is invalid syntax but LibCST handles it and renders the invalid code. We can either: - automatically escape the string quotes in the inner expression. -...
`ast` and libcst looks similar but different in many design details. To make it more clear and prevent confusion for users familiar with ast (I'm one of them), it worth...