-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
42 lines (36 loc) · 1.3 KB
/
Copy pathruff.toml
File metadata and controls
42 lines (36 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# ruff.toml
# This file is a semi Gemini-interpreted conversion of:
# https://github.com/google/styleguide/blob/gh-pages/pylintrc
# Global settings must be at the top of this file.
#
# Error "line to long" is not "fixable" as of Ruff v0.15.0:
# https://docs.astral.sh/ruff/rules/#error-e
# I've found that a setting of 80 will allow 81-character rows.
# Shortening it to 79 seems to keep it <=80, as desired.
# This *sorta* works, but it doesn't help reformat code strings, docstrings,
# and comments like I am used to. Black also does not provide this due to its
# shared design philosophy.
line-length = 79
indent-width = 4
target-version = "py312"
[format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[lint]
# Enable specific rule sets to match Google's strictness:
# E, W: Standard pycodestyle errors
# F: Pyflakes (unused imports, variables)
# I: isort (Import sorting - Google style)
# B: Flake8-bugbear (Likely bugs)
# D: Pydocstyle (Docstring formatting)
# UP: Pyupgrade (Modernize syntax)
select = ["E", "F", "W", "I", "B", "D", "UP"]
# Deduplicate "line too long" error, which is already flagged by Flake8.
ignore = ["E501"]
[lint.pydocstyle]
convention = "google"
[lint.isort]
force-single-line = true # One import per line
force-sort-within-sections = true