forked from janushendersonassetallocation/loman
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
110 lines (104 loc) · 3.81 KB
/
ruff.toml
File metadata and controls
110 lines (104 loc) · 3.81 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# This file is part of the tschm/.config-templates repository
# (https://github.com/tschm/.config-templates).
#
# Maximum line length for the entire project
line-length = 120
# Target Python version
target-version = "py311"
# Exclude directories with Jinja template variables in their names
exclude = ["**/[{][{]*/", "**/*[}][}]*/", "examples/**/*.ipynb"]
[lint]
# Available rule sets in Ruff:
# A: flake8-builtins - Check for python builtins being used as variables or parameters
# B: flake8-bugbear - Find likely bugs and design problems
# C4: flake8-comprehensions - Helps write better list/set/dict comprehensions
# D: pydocstyle - Check docstring style
# E: pycodestyle errors - PEP 8 style guide
# ERA: eradicate - Find commented out code
# F: pyflakes - Detect logical errors
# I: isort - Sort imports
# N: pep8-naming - Check PEP 8 naming conventions
# PT: flake8-pytest-style - Check pytest best practices
# RUF: Ruff-specific rules
# S: flake8-bandit - Find security issues
# SIM: flake8-simplify - Simplify code
# T10: flake8-debugger - Check for debugger imports and calls
# UP: pyupgrade - Upgrade syntax for newer Python
# W: pycodestyle warnings - PEP 8 style guide warnings
# ANN: flake8-annotations - Type annotation checks
# ARG: flake8-unused-arguments - Unused arguments
# BLE: flake8-blind-except - Check for blind except statements
# COM: flake8-commas - Trailing comma enforcement
# DTZ: flake8-datetimez - Ensure timezone-aware datetime objects
# EM: flake8-errmsg - Check error message strings
# FBT: flake8-boolean-trap - Boolean argument checks
# ICN: flake8-import-conventions - Import convention enforcement
# ISC: flake8-implicit-str-concat - Implicit string concatenation
# NPY: NumPy-specific rules
# PD: pandas-specific rules
# PGH: pygrep-hooks - Grep-based checks
# PIE: flake8-pie - Miscellaneous rules
# PL: Pylint rules
# Q: flake8-quotes - Quotation style enforcement
# RSE: flake8-raise - Raise statement checks
# RET: flake8-return - Return statement checks
# SLF: flake8-self - Check for self references
# TCH: flake8-type-checking - Type checking imports
# TID: flake8-tidy-imports - Import tidying
# TRY: flake8-try-except-raise - Try/except/raise checks
# YTT: flake8-2020 - Python 2020+ compatibility
# Selected rule sets to enforce:
# D: pydocstyle - Check docstring style
# E: pycodestyle errors - PEP 8 style guide
# F: pyflakes - Detect logical errors
# I: isort - Sort imports
# N: pep8-naming - Check PEP 8 naming conventions
# W: pycodestyle warnings - PEP 8 style guide warnings
# UP: pyupgrade - Upgrade syntax for newer Python
select = ["D", "E", "F", "I", "N", "W", "UP"]
[lint.pydocstyle]
convention = "google"
###########################################################
# Formatting configuration
###########################################################
[format]
# Use double quotes for strings
quote-style = "double"
# Use spaces for indentation
indent-style = "space"
# Automatically detect and use the appropriate line ending
line-ending = "auto"
###########################################################
# File-specific exceptions
###########################################################
[lint.per-file-ignores]
# Allow assert statements and ignore docstring requirements in tests
"tests/**/*.py" = [
"S101",
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D107",
"F403",
"F405",
"E741"
]
# Ignore self parameter naming for ComputationFactory methods
"tests/test_class_style_definition.py" = [
"N805",
]
"tests/standard_test_computations.py" = [
"N805",
]
# Allow non-lowercase variable names and assert statements in marimo files
"book/marimo/*.py" = [
"N803",
"S101",
]
# Ignore missing module docstring in docs config
"docs/conf.py" = [
"D100",
]