From 13914a26f4d57c64d3af68a42f94217d2ade4700 Mon Sep 17 00:00:00 2001 From: Sam Liu Date: Wed, 1 Feb 2023 13:34:21 -0800 Subject: [PATCH] ci: Upgrade ruff to 0.0.239 --- bin/json-format.py | 2 +- requirements/dev.txt | 2 +- ruff.toml | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/bin/json-format.py b/bin/json-format.py index f0089345e..5a2f6d578 100755 --- a/bin/json-format.py +++ b/bin/json-format.py @@ -9,7 +9,7 @@ import json from typing import Type -from bin._file_formatter import FileFormatter # noqa: module-import-not-at-top-of-file +from bin._file_formatter import FileFormatter class JSONFormatter(FileFormatter): diff --git a/requirements/dev.txt b/requirements/dev.txt index 3324a1fee..4441ae7fc 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -6,7 +6,7 @@ pytest-xdist~=2.5 pytest-env~=0.6.2 pytest-rerunfailures~=9.1.1 pyyaml~=5.4 -ruff==0.0.237 # loose the requirement once it is more stable +ruff==0.0.239 # loose the requirement once it is more stable # Test requirements pytest~=6.2.5 diff --git a/ruff.toml b/ruff.toml index bcc7155ac..2f3935020 100644 --- a/ruff.toml +++ b/ruff.toml @@ -25,3 +25,25 @@ target-version = "py37" [per-file-ignores] # python scripts in bin/ needs some python path configurations before import "bin/*.py" = ["E402"] # E402: module-import-not-at-top-of-file + +# Quick exclusion of too-many-args in legacy files, +# due to there are too many violations in them. +"samtranslator/metrics/metrics.py" = ["PLR0913"] +"samtranslator/model/api/api_generator.py" = ["PLR0913"] +"samtranslator/model/api/http_api_generator.py" = ["PLR0913"] +"samtranslator/model/apigateway.py" = ["PLR0913"] +"samtranslator/model/apigatewayv2.py" = ["PLR0913"] +"samtranslator/model/eventsources/push.py" = ["PLR0913"] +"samtranslator/model/eventsources/scheduler.py" = ["PLR0913"] +"samtranslator/model/role_utils/role_constructor.py" = ["PLR0913"] +"samtranslator/model/sam_resources.py" = ["PLR0913"] +"samtranslator/model/stepfunctions/events.py" = ["PLR0913"] +"samtranslator/model/stepfunctions/generators.py" = ["PLR0913"] +"samtranslator/open_api/open_api.py" = ["PLR0913"] +"samtranslator/plugins/api/implicit_api_plugin.py" = ["PLR0913"] +"samtranslator/plugins/api/implicit_http_api_plugin.py" = ["PLR0913"] +"samtranslator/plugins/api/implicit_rest_api_plugin.py" = ["PLR0913"] +"samtranslator/plugins/application/serverless_app_plugin.py" = ["PLR0913"] +"samtranslator/swagger/swagger.py" = ["PLR0913"] +"samtranslator/translator/translator.py" = ["PLR0913"] +"samtranslator/validator/value_validator.py" = ["PLR0913"]