Philipp Hörist pushed to branch master at gajim / gajim


Commits:
bf75d672 by Philipp Hörist at 2022-11-27T23:43:04+01:00
ci: Add ruff configuration

- - - - -


1 changed file:

- pyproject.toml


Changes:

=====================================
pyproject.toml
=====================================
@@ -149,3 +149,70 @@ include = [
     "gajim/plugins/plugins_i18n.py",
     "gajim/plugins/repository.py",
 ]
+
+
+[tool.ruff]
+line-length = 80
+
+select = [
+  "A",      # flake8-builtins
+  # "ANN",  # flake8-annotations
+  "B",      # flake8-bugbear
+  "BLE",    # flake8-blind-except
+  "C",      # flake8-comprehensions
+  "C901",   # mccabe
+  # "D",    # pydocstyle
+  "E",      # pycodestyle
+  "F",      # pyflakes  
+  "FBT",    # flake8-boolean-trap
+  # "I",    # flake8-tidy-imports, isort
+  "M",      # Meta rules
+  "N",      # pep8-naming
+  "Q",      # flake8-quotes
+  "RUF",    # Ruff-specific rules
+  "S",      # flake8-bandit
+  "T",      # flake8-debugger, flake8-print
+  "U",      # pyupgrade
+  "W",      # pycodestyle
+  "YTT",    # flake8-2020
+]
+
+ignore = [
+  "S101",   # Use of `assert` detected
+  "FBT003", # Boolean positional value in function call
+  "BLE001", # Blind except Exception: statement
+]
+
+exclude = [
+  ".eggs",
+  ".git",
+  ".ruff_cache",
+  ".venv",
+  "build",
+  "dist",
+  "venv",
+  "*.pyi",
+  # Code Folders
+  "gajim/gui",
+  "typings",
+  "gajim/common/config.py",     # legacy module, will be removed
+  "gajim/common/optparser.py",  # legacy module, will be removed
+  "gajim/common/socks5.py",  # legacy module, will be removed
+]
+
+# Allow unused variables when underscore-prefixed.
+dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
+target-version = "py39"
+
+[tool.ruff.per-file-ignores]
+"test/*" = ["E402"]
+"test/no_gui/test_styling.py" = ["RUF001"]
+
+
+[tool.ruff.mccabe]
+max-complexity = 15
+
+[tool.ruff.flake8-quotes]
+inline-quotes = "single"
+docstring-quotes = "single"
+multiline-quotes = "single"



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/bf75d67255aa91aa1e161cb599ff6ed16e948e46

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/bf75d67255aa91aa1e161cb599ff6ed16e948e46
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to