Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mypy: lint scripts without extensions (#21575)
Closes #21572 As suggested by @huonw, I modified `determine_python_files` so that it does not exclude scripts without python extensions. I also modified the test in `test_determine_python_files` to make it clear that this is intended. However I must admit that I am not sure of what the test's goal was. Could a `.json` file really make it to this function? My proposed change only works if the files considered here are python sources (and checking for the extension makes no sense because I should be allowed to name my python scripts with `.json` if I want). I tested in my own project and it worked perfectly. It raised errors for scripts that were not typechecked before. (By the way, me and the platform team at https://flare.io/ are huge fans of Pants. We are now about 9 months in and we have managed to transition our whole monorepo, implement distributed test caching, move to PEX for all services, and simplify many dev tools while getting rid of our home-made build system that kept getting more complex and slowing down. Pants was game-changing for Flare.)
- Loading branch information