Skip to content

Commit

Permalink
[fbsync] Add ufmt (usort + black) as code formatter (#4384)
Browse files Browse the repository at this point in the history
Summary:
* add ufmt as code formatter

* cleanup

* quote ufmt requirement

* split imports into more groups

* regenerate circleci config

* fix CI

* clarify local testing utils section

* use ufmt pre-commit hook

* split relative imports into local category

* Revert "split relative imports into local category"

This reverts commit f2e224c.

* pin black and usort dependencies

* fix local test utils detection

* fix ufmt rev

* add reference utils to local category

* fix usort config

* remove custom categories sorting

* Run pre-commit without fixing flake8

* got a double import in merge

Reviewed By: kazhang

Differential Revision: D31380329

fbshipit-source-id: c1ee3a57589401d88877201fbf40cc968681b640

Co-authored-by: Nicolas Hug <nicolashug@fb.com>
  • Loading branch information
NicolasHug authored and facebook-github-bot committed Oct 7, 2021
1 parent d833d33 commit 289f200
Show file tree
Hide file tree
Showing 183 changed files with 8,434 additions and 7,338 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ jobs:
pip install --user --progress-bar off types-requests
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
pip install --user --progress-bar off git+https://github.com/pytorch/data.git
pip install --user --progress-bar off --editable .
pip install --user --progress-bar off --no-build-isolation --editable .
mypy --config-file mypy.ini

docstring_parameters_sync:
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
command: |
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
# need to install torchvision dependencies due to transitive imports
pip install --user --progress-bar off .
pip install --user --progress-bar off --no-build-isolation .
pip install pytest
python test/test_hub.py

Expand All @@ -248,7 +248,7 @@ jobs:
command: |
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
# need to install torchvision dependencies due to transitive imports
pip install --user --progress-bar off .
pip install --user --progress-bar off --no-build-isolation .
pip install --user onnx
pip install --user onnxruntime
pip install --user pytest
Expand Down
Loading

0 comments on commit 289f200

Please sign in to comment.