@@ -60,3 +60,105 @@ exclude_lines = [
6060 " if __name__ == .__main__.:" ,
6161 " if TYPE_CHECKING:" ,
6262]
63+
64+ [tool .ruff ]
65+ line-length = 120
66+
67+ [tool .ruff .lint ]
68+ ignore = [
69+ # E402: Module level import not at top of file
70+ # Ignored because logging configuration needs to be set before imports
71+ " E402" ,
72+ # FBT001/FBT002: Boolean typed positional/default argument in function definition
73+ # Ignored because this is a common pattern in API design
74+ " FBT001" ,
75+ " FBT002" ,
76+ # N802: Function name should be lowercase
77+ # Ignored to allow acronyms like GHSA in function names
78+ " N802" ,
79+ # RUF013: PEP 484 prohibits implicit Optional
80+ # Ignored as explicit Optional is verbose and the pattern is clear
81+ " RUF013" ,
82+ # FA100/FA102: Add from __future__ import annotations
83+ # Ignored as this is a style preference and PEP 604 union syntax is valid in Python 3.10+
84+ " FA100" ,
85+ " FA102" ,
86+ # A001/A002/A003: Variable/argument/class attribute is shadowing a Python builtin
87+ # Ignored as 'next', 'id', 'type' are common parameter names in this codebase
88+ " A001" ,
89+ " A002" ,
90+ " A003" ,
91+ # PLR2004: Magic value used in comparison
92+ # Ignored as magic values are acceptable in this codebase for simple comparisons
93+ " PLR2004" ,
94+ # G004: Logging statement uses f-string
95+ # Ignored as f-strings in logging are acceptable
96+ " G004" ,
97+ # T201: print found
98+ # Ignored in MCP servers where print is used for output
99+ " T201" ,
100+ # S607: Starting a process with a partial executable path
101+ # Ignored as we trust the environment configuration
102+ " S607" ,
103+ # ARG001/ARG002: Unused function/method argument
104+ # Ignored as some arguments may be required for API compatibility
105+ " ARG001" ,
106+ " ARG002" ,
107+ # TID252: Prefer absolute imports over relative imports
108+ # Ignored as relative imports are acceptable within the same package
109+ " TID252" ,
110+ # RET504: Unnecessary assignment before return statement
111+ # Ignored as this pattern can improve readability
112+ " RET504" ,
113+ # TRY003: Avoid specifying long messages outside the exception class
114+ # Ignored as inline error messages are acceptable for simple cases
115+ " TRY003" ,
116+ # EM102: Exception must not use an f-string literal
117+ # Ignored as f-strings in exceptions are acceptable
118+ " EM102" ,
119+ # TRY300: Consider moving this statement to an else block
120+ # Ignored as the current pattern is acceptable
121+ " TRY300" ,
122+ # BLE001: Do not catch blind exception
123+ # Ignored as catching Exception is sometimes necessary for error handling
124+ " BLE001" ,
125+ # SIM117: Use a single with statement with multiple contexts
126+ # Ignored as nested with statements can be more readable
127+ " SIM117" ,
128+ # PLW0602: Using global for variable but no assignment is done
129+ # Ignored as globals may be used for module-level configuration
130+ " PLW0602" ,
131+ # PIE810: Call startswith/endswith once with a tuple
132+ # Ignored as multiple calls can be more readable
133+ " PIE810" ,
134+ # SIM102: Use a single if statement instead of nested if statements
135+ # Ignored as nested if can be more readable in some cases
136+ " SIM102" ,
137+ # SIM101: Use a single if statement instead of multiple nested if statements
138+ # Ignored as nested if can be more readable in some cases
139+ " SIM101" ,
140+ # PERF401: Use list.extend to create a transformed list
141+ # Ignored as append in a loop can be more readable
142+ " PERF401" ,
143+ # PERF102: When using only the keys/values of a dict use keys()/values()
144+ # Ignored as items() usage can be intentional
145+ " PERF102" ,
146+ # LOG015: debug() call on root logger
147+ # Ignored as root logger usage is acceptable for simple logging
148+ " LOG015" ,
149+ # PLC0206: Cannot have defined parameters for properties
150+ # Ignored as this is an intentional pattern
151+ " PLC0206" ,
152+ # RUF015: Prefer next(...) over single element slice
153+ # Ignored as slice can be more readable
154+ " RUF015" ,
155+ # B008: Do not perform function call in argument defaults
156+ # Ignored as Field() defaults are common in Pydantic
157+ " B008" ,
158+ ]
159+
160+ [tool .ruff .lint .per-file-ignores ]
161+ "tests/*" = [
162+ # S101: Use of assert detected
163+ " S101" ,
164+ ]
0 commit comments