forked from phoenix/litellm-mirror
(ci/cd) use ruff
This commit is contained in:
parent
9a5e63d3e8
commit
02b5c03739
2 changed files with 9 additions and 14 deletions
|
@ -1,15 +1,14 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: 24.2.0
|
# Ruff version.
|
||||||
|
rev: v0.4.8
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
# Run the linter.
|
||||||
- repo: https://github.com/pycqa/flake8
|
- id: ruff
|
||||||
rev: 7.0.0 # The version of flake8 to use
|
exclude: ^litellm/tests/|^litellm/proxy/proxy_cli.py|^litellm/proxy/tests/
|
||||||
hooks:
|
# Run the formatter.
|
||||||
- id: flake8
|
- id: ruff-format
|
||||||
exclude: ^litellm/tests/|^litellm/proxy/proxy_cli.py|^litellm/proxy/tests/
|
exclude: ^litellm/tests/|^litellm/proxy/proxy_cli.py|^litellm/proxy/tests/
|
||||||
additional_dependencies: [flake8-print]
|
|
||||||
files: litellm/.*\.py
|
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-files-match
|
- id: check-files-match
|
||||||
|
|
|
@ -1398,7 +1398,6 @@ def test_hf_test_completion_tgi():
|
||||||
|
|
||||||
|
|
||||||
def mock_post(url, data=None, json=None, headers=None):
|
def mock_post(url, data=None, json=None, headers=None):
|
||||||
|
|
||||||
print(f"url={url}")
|
print(f"url={url}")
|
||||||
if "text-classification" in url:
|
if "text-classification" in url:
|
||||||
raise Exception("Model not found")
|
raise Exception("Model not found")
|
||||||
|
@ -2240,9 +2239,6 @@ def test_re_use_openaiClient():
|
||||||
pytest.fail("got Exception", e)
|
pytest.fail("got Exception", e)
|
||||||
|
|
||||||
|
|
||||||
# test_re_use_openaiClient()
|
|
||||||
|
|
||||||
|
|
||||||
def test_completion_azure():
|
def test_completion_azure():
|
||||||
try:
|
try:
|
||||||
print("azure gpt-3.5 test\n\n")
|
print("azure gpt-3.5 test\n\n")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue