diff --git a/.github/workflows/shared-tests.yml b/.github/workflows/shared-tests.yml index 9ea5726..24fa6a0 100644 --- a/.github/workflows/shared-tests.yml +++ b/.github/workflows/shared-tests.yml @@ -33,6 +33,9 @@ jobs: - name: Run Spell Check run: codespell + + - name: Run Linter Ruff + run: ruff check . --output-format=github - name: 'Run Tests' run: | diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000..b679570 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,19 @@ +# ruff.toml + +exclude = [ + "skyflow/generated", + ".git", + ".ruff_cache", + ".venv", + "venv", + "build", + "dist", + "tests" +] + +line-length = 120 + +[lint] +select = ["N"] + +[lint.pep8-naming] diff --git a/setup.py b/setup.py index b27bb0b..09f844d 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,7 @@ extras_require={ 'dev': [ 'codespell', + 'ruff' ] }, python_requires=">=3.8", diff --git a/skyflow/utils/validations/_validations.py b/skyflow/utils/validations/_validations.py index 3da8b3a..f3428f4 100644 --- a/skyflow/utils/validations/_validations.py +++ b/skyflow/utils/validations/_validations.py @@ -818,4 +818,3 @@ def validate_reidentify_text_request(self, request: ReidentifyTextRequest): def validate_get_detect_run_request(self, request: GetDetectRunRequest): if not request.run_id or not isinstance(request.run_id, str) or not request.run_id.strip(): raise SkyflowError(SkyflowMessages.Error.INVALID_RUN_ID.value, invalid_input_error_code) -