Jimmy Lai

Results 33 comments of Jimmy Lai

Make suppression comment `lint-ignore: AddMissingHeaderRule` works is a better and more consistent user experience. #156 is specific for ImportConstraintRule which doesn't seem related.

> What if we take as headers only comments starting with `#!` or `#\s*@` and also comments that are not followed by a statement?, in other words any of the...

As the error message suggested, it detected the generated code changes from codegen and you can run `tox -e codegen` to generate the new changes. https://github.com/Instagram/LibCST/blob/master/tox.ini#L78

The issue is likely only show up in your build environment. To know more about the issue, you can run `tox -e codegen` to find out what's changed.

To run the tests, it requires installing the dependencies (tox/isort/...). You can also run the codegen commands manually. https://github.com/Instagram/LibCST/blob/master/tox.ini#L78-L85 The cogen runs `isort -y ...` to format the code and...

If it makes sense to include the `tox.ini` in sdist, feel free to propose a change to include it.

Test data files are now included and will be available in the next release.

Yeah, implement visit_ and leave_ function for every statement-like node types can add a lot of code. We can simplify it by adding a helper and just calls the helper...

I also think this should be implemented in the pattern of `AddImportsVisitor` and `RemoveImportsVisitor` for consistency. That means `insert_statements_before_current` and `insert_statements_after_current` will be static methods. The other type of visitor...

In my idea, when you call the staticmethod, you need to provide a `CSTNode` included in the current statement as a reference point to insert new statements before of after...