Skip to content

Commit c457eb5

Browse files
committed
Add ruff configuration file for linting and formatting
1 parent 1e9c5f0 commit c457eb5

4 files changed

Lines changed: 73 additions & 1 deletion

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.venv
2-
.vscode
32
ssh_key.pem
43
output
54
**/__pycache__

.vscode/extensions.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"recommendations": [
3+
"ms-python.python",
4+
"ms-python.vscode-pylance",
5+
"charliermarsh.ruff",
6+
"ms-toolsai.jupyter",
7+
"github.copilot",
8+
"tamasfe.even-better-toml",
9+
"aaron-bond.better-comments",
10+
"github.vscode-github-actions",
11+
"bierner.markdown-mermaid",
12+
"postman.postman-for-vscode",
13+
"alexcvzz.vscode-sqlite",
14+
"ms-vscode-remote.remote-containers",
15+
]
16+
}

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"python.envFile": "${workspaceFolder}/.env",
3+
"python.terminal.activateEnvironment": true,
4+
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
5+
// Test settings
6+
"python.testing.pytestEnabled": true,
7+
"python.testing.unittestEnabled": false,
8+
"python.testing.cwd": "${workspaceFolder}/tests",
9+
"python.testing.pytestPath": "${workspaceFolder}/.venv/bin/pytest",
10+
"python.testing.autoTestDiscoverOnSaveEnabled": true,
11+
}

ruff.toml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
exclude = [
2+
".bzr",
3+
".direnv",
4+
".eggs",
5+
".git",
6+
".git-rewrite",
7+
".hg",
8+
".ipynb_checkpoints",
9+
".mypy_cache",
10+
".nox",
11+
".pants.d",
12+
".pyenv",
13+
".pytest_cache",
14+
".pytype",
15+
".ruff_cache",
16+
".svn",
17+
".tox",
18+
".venv",
19+
".vscode",
20+
"__pypackages__",
21+
"_build",
22+
"buck-out",
23+
"build",
24+
"dist",
25+
"node_modules",
26+
"site-packages",
27+
"venv",
28+
]
29+
line-length = 88
30+
indent-width = 4
31+
target-version = "py312"
32+
33+
[lint]
34+
select = ["E4", "E7", "E9", "F"]
35+
ignore = []
36+
fixable = ["ALL"]
37+
unfixable = []
38+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
39+
40+
[format]
41+
quote-style = "double"
42+
indent-style = "space"
43+
skip-magic-trailing-comma = false
44+
line-ending = "auto"
45+
docstring-code-format = true
46+
docstring-code-line-length = "dynamic"

0 commit comments

Comments
 (0)