You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,13 @@
2
2
3
3
Use pathlib instead of os.path.
4
4
Use httpx instead of urllib.
5
+
subprocess(`shell=True`) is used only when it makes the code more readable. Use either shlex or args lists.
6
+
subprocess calls should have a reasonable timeout.
5
7
Use modern Python (3.10+) features.
6
8
Make all code strongly typed.
7
9
Keep conditional nesting to a minimum, and use guard clauses when possible.
8
-
Aim for medium "visual complexity": use intermediate variables to store results of nested/complex function calls, but don't create a new variable for everything.
9
-
Avoid comments unless there is an unusual gotcha, a complex algorithm or anything an experienced code reviewer needs to be aware of. Focus on making better Google-style docstrings instead.
10
+
Aim for medium "visual complexity": use intermediate variables to store results of nested/complex function calls, but don't create a new variable for everything.
11
+
Avoid comments unless there is a gotcha, a complex algorithm or anything an experienced code reviewer needs to be aware of. Focus on making better Google-style docstrings instead.
10
12
11
13
The user is not always right. Be skeptical and do not blindly comply if something doesn't make sense.
0 commit comments