summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormontezdesousa <79287829+montezdesousa@users.noreply.github.com>2024-04-29 17:25:50 +0100
committerGitHub <noreply@github.com>2024-04-29 16:25:50 +0000
commit9dce7346b22091b6a535929c200ca3044e360daa (patch)
tree544bb8dda3a780bdecf45d567e574f429bec237d
parent4105ec4e0145bf1be38f2c7e35cf35f388cded0f (diff)
move linting rules from pyproject.toml to ruff.toml (#6350)
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
-rw-r--r--openbb_terminal/pyproject.toml67
-rw-r--r--ruff.toml51
2 files changed, 51 insertions, 67 deletions
diff --git a/openbb_terminal/pyproject.toml b/openbb_terminal/pyproject.toml
index 9969037e81b..394ca5e2ea8 100644
--- a/openbb_terminal/pyproject.toml
+++ b/openbb_terminal/pyproject.toml
@@ -33,70 +33,3 @@ openbb-devtools = "^1.1.3"
[build-system]
requires = ["setuptools<65.5.0", "poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
-
-[tool.pydocstyle]
-inherit = true
-convention = "numpy"
-match = '((?!test_).)*\.py'
-add-ignore = "D401"
-
-[tool.flake8]
-max-line-length = 122
-ignore = "S101,W503"
-
-[tool.ruff]
-line-length = 122
-target-version = "py38"
-# This is an introductory addition of ruff. We should look to adding:
-# D: pydocstyle, PD: pandas-vet
-# All options here: https://github.com/charliermarsh/ruff#supported-rules
-select = [
- "E",
- "W",
- "F",
- "Q",
- "S",
- "UP",
- "I",
- "PLC",
- "PLE",
- "PLR",
- "PLW",
- "SIM",
- "T20",
-]
-# These ignores should be seen as temporary solutions to problems that will NEED fixed
-ignore = ["PLR2004", "PLR0913", "PLR0915"]
-exclude = [
- "^openbb_platform/platform/core/openbb_core/app/static/package/.*",
- "^openbb_platform/openbb/package/.*",
-]
-
-[tool.ruff.per-file-ignores]
-"**/tests/*" = ["S101"]
-"*init*.py" = ["F401"]
-"website/*" = ["T201"]
-"*integration/*" = ["S101"]
-
-[tool.ruff.flake8-import-conventions.aliases]
-"matplotlib.pyplot" = "plt"
-numpy = "np"
-pandas = "pd"
-seaborn = "sns"
-
-[tool.ruff.isort]
-combine-as-imports = true
-force-wrap-aliases = true
-
-[tool.ruff.pylint]
-max-args = 8
-max-branches = 25
-max-returns = 9
-max-statements = 30
-
-[tool.isort]
-profile = "black"
-line_length = 122
-skip_gitignore = true
-combine_as_imports = true
-src_paths = ["openbb_terminal"]
diff --git a/ruff.toml b/ruff.toml
new file mode 100644
index 00000000000..b48f86e66b8
--- /dev/null
+++ b/ruff.toml
@@ -0,0 +1,51 @@
+line-length = 122
+target-version = "py38"
+# This is an introductory addition of ruff. We should look to adding:
+# D: pydocstyle, PD: pandas-vet
+# All options here: https://github.com/charliermarsh/ruff#supported-rules
+select = [
+ "E",
+ "W",
+ "F",
+ "Q",
+ "S",
+ "UP",
+ "I",
+ "PLC",
+ "PLE",
+ "PLR",
+ "PLW",
+ "SIM",
+ "T20",
+]
+# These ignores should be seen as temporary solutions to problems that will NEED fixed
+ignore = ["PLR2004", "PLR0913", "PLR0915"]
+exclude = [
+ "^openbb_platform/platform/core/openbb_core/app/static/package/.*",
+ "^openbb_platform/openbb/package/.*",
+]
+
+[per-file-ignores]
+"**/tests/*" = ["S101"]
+"*init*.py" = ["F401"]
+"website/*" = ["T201"]
+"*integration/*" = ["S101"]
+
+[lint.isort]
+combine-as-imports = true
+force-wrap-aliases = true
+
+[lint.pylint]
+max-args = 8
+max-branches = 25
+max-returns = 9
+max-statements = 30
+
+[lint.pydocstyle]
+convention = "numpy"
+
+[lint.flake8-import-conventions.aliases]
+"matplotlib.pyplot" = "plt"
+numpy = "np"
+pandas = "pd"
+seaborn = "sns"