diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1826a780cd..2808299f3e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,13 +13,10 @@ "[python]": { "editor.formatOnSave": true }, - "python.linting.enabled": true, - "python.linting.pylintEnabled": true, - "python.linting.pylintPath": "/usr/local/bin/pylint", "python.pythonPath": "/usr/local/bin/python" }, "extensions": [ - "bungcip.better-toml", + "tamasfe.even-better-toml", "donjayamanne.python-extension-pack", "eamodio.gitlens", "GitHub.copilot", @@ -61,5 +58,4 @@ }, "postCreateCommand": "notify-dev-entrypoint.sh", "remoteUser": "vscode", - } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b0faebf6d5..d5555d8629 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,42 +1,3 @@ -[tool.ruff] -target-version = "py310" -exclude = ["venv*", "__pycache__", "node_modules", "cache", "migrations", "build"] -extend-include = ['(app|migrations|tests)/.*\.pyi?$'] -src = ["app", "migrations", "tests"] -# Ruff formatter will wrap lines at a length of 130 characters. -line-length = 130 -indent-width = 4 - -[tool.ruff.lint] -select = [ - # PyFlakes - "F", - # Pycodestyle - "E", - "W", - # isort - "I001", - "I002" -] -ignore = ["E203", "E501", "E402"] - -# Provide line length leeway for docstrings -[tool.ruff.lint.pycodestyle] -max-doc-length = 170 -# Enforce doc string format? (google, numpy or pep257) -# convention = "google" - -[tool.ruff.format] -# Match black formatting -# Double quotes for strings. -quote-style = "double" -# Indent with spaces, rather than tabs. -indent-style = "space" -# Respect magic trailing commas. -skip-magic-trailing-comma = false -# Automatically detect the appropriate line ending. -line-ending = "auto" - [tool.poetry] name = "notification-api" version = "0.1.0" @@ -136,3 +97,43 @@ types-python-dateutil = "2.8.19.20240106" types-pytz = "2022.7.1.2" types-redis = "4.6.0.20240106" types-requests = "2.31.0.20240106" + + +[tool.ruff] +target-version = "py310" +exclude = ["venv*", "__pycache__", "node_modules", "cache", "migrations", "build"] +extend-include = ['(app|migrations|tests)/.*\.pyi?$'] +src = ["app", "migrations", "tests"] +# Ruff formatter will wrap lines at a length of 130 characters. +line-length = 130 +indent-width = 4 + +[tool.ruff.lint] +select = [ + # PyFlakes + "F", + # Pycodestyle + "E", + "W", + # isort + "I001", + "I002" +] +ignore = ["E203", "E501", "E402"] + +# Provide line length leeway for docstrings +[tool.ruff.lint.pycodestyle] +max-doc-length = 170 +# Enforce doc string format? (google, numpy or pep257) +# convention = "google" + +[tool.ruff.format] +# Match black formatting +# Double quotes for strings. +quote-style = "double" +# Indent with spaces, rather than tabs. +indent-style = "space" +# Respect magic trailing commas. +skip-magic-trailing-comma = false +# Automatically detect the appropriate line ending. +line-ending = "auto" \ No newline at end of file