Skip to content

Commit

Permalink
Move ruff formatter configs to the bottom of pyproject.toml
Browse files Browse the repository at this point in the history
- Migrate better toml extension to even better toml due to deprecation
- Remove deprecated vscode linter settings
  • Loading branch information
whabanks committed May 24, 2024
1 parent 4a62bce commit 11b275f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 44 deletions.
6 changes: 1 addition & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -61,5 +58,4 @@
},
"postCreateCommand": "notify-dev-entrypoint.sh",
"remoteUser": "vscode",

}
79 changes: 40 additions & 39 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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"

0 comments on commit 11b275f

Please sign in to comment.