diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cc41d85f1..41bff6d84 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,15 +1,14 @@ repos: -- repo: https://github.com/psf/black - rev: 24.2.0 +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.4.8 hooks: - - id: black -- repo: https://github.com/pycqa/flake8 - rev: 7.0.0 # The version of flake8 to use - hooks: - - id: flake8 - exclude: ^litellm/tests/|^litellm/proxy/proxy_cli.py|^litellm/proxy/tests/ - additional_dependencies: [flake8-print] - files: litellm/.*\.py + # Run the linter. + - id: ruff + exclude: ^litellm/tests/|^litellm/proxy/proxy_cli.py|^litellm/proxy/tests/ + # Run the formatter. + - id: ruff-format + exclude: ^litellm/tests/|^litellm/proxy/proxy_cli.py|^litellm/proxy/tests/ - repo: local hooks: - id: check-files-match diff --git a/litellm/tests/test_completion.py b/litellm/tests/test_completion.py index 47c55ca4f..d143d1ab8 100644 --- a/litellm/tests/test_completion.py +++ b/litellm/tests/test_completion.py @@ -1398,7 +1398,6 @@ def test_hf_test_completion_tgi(): def mock_post(url, data=None, json=None, headers=None): - print(f"url={url}") if "text-classification" in url: raise Exception("Model not found") @@ -2240,9 +2239,6 @@ def test_re_use_openaiClient(): pytest.fail("got Exception", e) -# test_re_use_openaiClient() - - def test_completion_azure(): try: print("azure gpt-3.5 test\n\n")