File tree 4 files changed +48
-1
lines changed
4 files changed +48
-1
lines changed Original file line number Diff line number Diff line change 10
10
" usernamehw.errorlens" ,
11
11
" hediet.vscode-drawio" ,
12
12
" swyddfa.esbonio" ,
13
- " lextudio.restructuredtext"
13
+ " lextudio.restructuredtext" ,
14
+ " charliermarsh.ruff"
14
15
]
15
16
}
16
17
}
Original file line number Diff line number Diff line change 11
11
12
12
// ErrorLens highlights errors and warnings in your code / docs
13
13
" usernamehw.errorlens" ,
14
+
15
+ // Linting and formatting for Python (LSP via ruff server)
16
+ " charliermarsh.ruff" ,
14
17
]
15
18
}
Original file line number Diff line number Diff line change 34
34
"editor.rulers" : [
35
35
79
36
36
],
37
+ // Opinionated option for the future:
38
+ // "editor.formatOnSave": true,
39
+ "editor.codeActionsOnSave" : {
40
+ "source.sortImports" : " explicit"
41
+ },
42
+ "editor.defaultFormatter" : " charliermarsh.ruff" ,
37
43
},
38
44
39
45
// Markdown Settings
Original file line number Diff line number Diff line change
1
+ # This file is at the root level, as it applies to all Python code,
2
+ # not only to docs or to tools.
3
+
4
+ [tool .pyright ]
5
+ typeCheckingMode = " standard"
6
+ pythonVersion = " 3.12" # Keep in sync with MODULE.bazel
7
+
8
+ exclude = [
9
+ " **/__pycache__" ,
10
+ " **/.*" ,
11
+ " bazel-*" ,
12
+ ]
13
+
14
+ [tool .ruff ]
15
+ target-version = " py312"
16
+ extend-exclude = [
17
+ " __pycache__" ,
18
+ " .*" ,
19
+ " bazel-*" ,
20
+ ]
21
+
22
+ # Selected rules for clean code, readability, and bug prevention
23
+ lint.select = [
24
+ " E" , # pycodestyle (PEP8)
25
+ " F" , # pyflakes (undefined vars, unused imports)
26
+ " I" , # isort (import sorting)
27
+ " B" , # flake8-bugbear (likely bugs)
28
+ " C90" , # mccabe (complexity checks)
29
+ " UP" , # pyupgrade (modern Python 3.12+ features)
30
+ " SIM" , # flake8-simplify (simplifies code patterns)
31
+ " RET" # flake8-return (consistent return statements)
32
+ ]
33
+
34
+ lint.ignore = [
35
+ # Rules we want to ignore go in here.
36
+ # Always provide a comment explaining why.
37
+ ]
You can’t perform that action at this time.
0 commit comments