Skip to content

Commit

Permalink
Start bundling ruff-api
Browse files Browse the repository at this point in the history
  • Loading branch information
amyreese committed Oct 18, 2024
1 parent c4217d3 commit a121a76
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bundled/tool/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,20 @@ def _run_tool_on_document(
import ufmt.util
import usort

try:
import ruff_api

ruff_api_version = ruff_api.__version__
except ImportError as e:
log_to_output(f"ruff-api failed to import: {e}")
ruff_api_version = "None"

log_to_output(
"formatting with:"
f" ufmt=={ufmt.__version__}"
f" black=={black.__version__}"
f" libcst=={libcst.LIBCST_VERSION}"
f" ruff-api=={ruff_api_version}"
f" usort=={usort.__version__}"
)

Expand Down
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ packaging

# TODO: Add your tool here
black>=24.2.0,<25
ruff-api>=0.0.8,<1
ufmt>=2.1.0,<3
33 changes: 33 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,39 @@ pyyaml==6.0.2 \
--hash=sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12 \
--hash=sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4
# via libcst
ruff-api==0.0.8 \
--hash=sha256:01359ead0338eb0279d62749c7946047952ae2d805e575f6199730542f050848 \
--hash=sha256:0e828dfb91f8ec6b5fcf2a505ce6e373180f61939695c6eb28e860a86c44f724 \
--hash=sha256:151759a2401ccf226454a873eb5b9f48e697694648e21efd76e2805f30a52a38 \
--hash=sha256:168724345204a8bdd7d7688ca981e5843f7d36cc6f476925e3b61fd6c68ee183 \
--hash=sha256:175649106b17cd86dc2b6648e21ad029629619cdc622dee6a2d5107e3b96b3f5 \
--hash=sha256:314b51addf68f4a71fd3393118cd3dd9bae292b7b3111c3b7db7f41fe839e92e \
--hash=sha256:32876c19d84e94b391f15b820fe5caa386ea3b5703d1a3b360e31996638243eb \
--hash=sha256:374e40d1cd9962ab583186971ce3ff3e7fa094283bb87e3c40812d7a27374dee \
--hash=sha256:3a15893c2707849d54781a03d1a779fcf8bf294f7262458c6fe27db8db935683 \
--hash=sha256:3b36f868421ddb670c97156a786437d5d5dea63f2fde2b764ef55fe8cd32cf01 \
--hash=sha256:4b479fcd8f394b2612e293e8f1e339d7655a391e4368a236b59c29b80270758a \
--hash=sha256:53673411aaa364f157daf0b7699b5386d6e7fce3b78b7651330b695e19df523e \
--hash=sha256:5a73bb96f581dfc7f0cc2f276b9483a10a68bb99599deedaf76773c332d1ca50 \
--hash=sha256:71c95907c736c516f8849a88c3ddfb669a55b366f314eeefba6b4f0b72cecbf3 \
--hash=sha256:7721fd8fa0ea366e3200fcf0ef9358fc8190717a6a11009fb518a60071b6d73a \
--hash=sha256:924e7e6b0a09cd95c30dbe15b687c11c7041a1f3a841f4d646147ed15464409f \
--hash=sha256:9b294c44252d9d7b768b2920b9c26b65a4dc43ee42d14df4ee911301d2293016 \
--hash=sha256:9ebd7797dc0e03dc2f58901a52f6613c99c1407e5a09711a2faa74f309a91b49 \
--hash=sha256:9fd25750e81703e012036ae1909d3ba1e96acad7c3823b6527271b1cf024df95 \
--hash=sha256:a52bee5b15f8f905f17c5b6ec8a8bd50a1e9afb750223b6f5f4e1533103cdde9 \
--hash=sha256:ac323ec433498a3e35d91ad2f9f9c6cd40e15dbeb0fee3912ea5af5ca681e007 \
--hash=sha256:b5b3ea8b42f16e69d3602262b4de755c7e7d3be0670ac9a1f67dec30695bc1d1 \
--hash=sha256:d4e54de8dd7cd5b09af97060136a6417c578726566effd1f0dbdc9ac45bfa720 \
--hash=sha256:d83689e614d1157c61f9aa7ba74d0e87b2fc95d0f00bfac713f607de798ffeca \
--hash=sha256:e1757544ae1156ce2d585e632b98f4c76eac2fb302683d95459e9a50bfb6fbfa \
--hash=sha256:e8fd1c89f7fb9ec3fbb22edca12a9427832eb8b74ceeae9dc9473684ea90d8a6 \
--hash=sha256:e970df563622f86a76b741b2a1bb1b2c3236f31b2e31ac3ca2d4933ef58ab1dc \
--hash=sha256:edaf82f7d7fe3c2f5fc5df16ce3824c2c6a4fcc5c232b3cacbdd145f8c7c6cc2 \
--hash=sha256:f3ab34e682d12636c2c783402f0ec41e631ef81e3f252fd1187c91c581a11a53 \
--hash=sha256:f533a8f203691c375ed9f4e5a7defa20e093d407b2fb637f4a53dab626293c8e \
--hash=sha256:f600e9f5a6847168fc11507bcc90f442f1c0a1c05137e8af533a752d9176af22
# via -r ./requirements.in
stdlibs==2024.5.15 \
--hash=sha256:42e0e49747dfd7af21db459bf83e15dd13e49332304667edabf88b94231e9b59 \
--hash=sha256:f775fae037583193c4bb808bf3d01d416b9e93c25736d40d04caef17c3a5490f
Expand Down

0 comments on commit a121a76

Please sign in to comment.