From b947e78c290c5bdecebbf537576b76289532b2aa Mon Sep 17 00:00:00 2001 From: Leon Luttenberger Date: Thu, 29 Feb 2024 12:45:29 -0600 Subject: [PATCH] adapt sagemaker-notebook to ruff --- .../sagemaker/sagemaker-notebook/coverage.ini | 3 - .../sagemaker-notebook/pyproject.toml | 64 ++++++++++--------- .../sagemaker/sagemaker-notebook/setup.cfg | 28 -------- .../sagemaker/sagemaker-studio/coverage.ini | 3 - 4 files changed, 35 insertions(+), 63 deletions(-) delete mode 100644 modules/sagemaker/sagemaker-notebook/coverage.ini delete mode 100644 modules/sagemaker/sagemaker-notebook/setup.cfg delete mode 100644 modules/sagemaker/sagemaker-studio/coverage.ini diff --git a/modules/sagemaker/sagemaker-notebook/coverage.ini b/modules/sagemaker/sagemaker-notebook/coverage.ini deleted file mode 100644 index c3878739..00000000 --- a/modules/sagemaker/sagemaker-notebook/coverage.ini +++ /dev/null @@ -1,3 +0,0 @@ -[run] -omit = - tests/* \ No newline at end of file diff --git a/modules/sagemaker/sagemaker-notebook/pyproject.toml b/modules/sagemaker/sagemaker-notebook/pyproject.toml index 1f856efe..2596b06b 100644 --- a/modules/sagemaker/sagemaker-notebook/pyproject.toml +++ b/modules/sagemaker/sagemaker-notebook/pyproject.toml @@ -1,35 +1,41 @@ -[tool.black] +[tool.ruff] +exclude = [ + ".eggs", + ".git", + ".hg", + ".mypy_cache", + ".ruff_cache", + ".tox", + ".venv", + "_build", + "buck-out", + "build", + "dist", + "codeseeder", +] line-length = 120 -target-version = ["py36", "py37", "py38"] -exclude = ''' -/( - \.eggs - | \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | \.env - | _build - | buck-out - | build - | dist - | codeseeder.out -)/ -''' +target-version = "py38" -[tool.isort] -multi_line_output = 3 -include_trailing_comma = true -force_grid_wrap = 0 -use_parentheses = true -ensure_newline_before_comments = true -line_length = 120 -py_version = 36 -skip_gitignore = false +[tool.ruff.lint] +select = ["F", "I", "E", "W"] +fixable = ["ALL"] + +[tool.mypy] +python_version = "3.8" +strict = true +ignore_missing_imports = true +disallow_untyped_decorators = false +exclude = "codeseeder.out/|example/|tests/|.venv" +warn_unused_ignores = false [tool.pytest.ini_options] -addopts = "-v --cov=. --cov-report term --cov-config=coverage.ini --cov-fail-under=80" +addopts = "-v --cov=. --cov-report term" pythonpath = [ "." -] \ No newline at end of file +] + +[tool.coverage.run] +omit = ["tests/*"] + +[tool.coverage.report] +fail_under = 80 diff --git a/modules/sagemaker/sagemaker-notebook/setup.cfg b/modules/sagemaker/sagemaker-notebook/setup.cfg deleted file mode 100644 index 99bdc5b7..00000000 --- a/modules/sagemaker/sagemaker-notebook/setup.cfg +++ /dev/null @@ -1,28 +0,0 @@ -[metadata] -license_files = - LICENSE - NOTICE - VERSION - -[flake8] -max-line-length = 120 -extend-ignore = E203, W503 -exclude = - .git, - __pycache__, - docs/source/conf.py, - old, - build, - dist, - .venv, - codeseeder.out, - bundle - -[mypy] -python_version = 3.7 -strict = True -ignore_missing_imports = True -allow_untyped_decorators = True -exclude = - codeseeder.out/|example/|tests/|.venv -warn_unused_ignores = False \ No newline at end of file diff --git a/modules/sagemaker/sagemaker-studio/coverage.ini b/modules/sagemaker/sagemaker-studio/coverage.ini deleted file mode 100644 index c3878739..00000000 --- a/modules/sagemaker/sagemaker-studio/coverage.ini +++ /dev/null @@ -1,3 +0,0 @@ -[run] -omit = - tests/* \ No newline at end of file