Make formatting and linting scripts more flexible.
* Allow the scripts to be run from any directory, not just the root of the Keras repo. This can be subdirectories or parent directories. * Allow `format.sh` to take multiple files as input and glob patterns. * Move the isort `--sl` option to the `setup.cfg` file instead of repeating it on the command line. * Remove redundant `-c` option in `isort --check` * `format.sh hg` and `format.sh g4` handle all the modified files in one go instead of file by file to get an output that is more consistent with the other ways of running `format.sh`. * Simplify `format.sh hg` and `format.sh g4` by taking advantage of the filtering option of `hg` and `g4`. PiperOrigin-RevId: 477848955
This commit is contained in:
parent
2da8732155
commit
bffc22f612
@ -1,4 +1,5 @@
|
||||
[isort]
|
||||
force_single_line=True
|
||||
known_first_party=keras
|
||||
line_length=80
|
||||
profile=black
|
||||
|
Loading…
Reference in New Issue
Block a user