@@ -86,6 +86,87 @@ yapf = "pylsp.plugins.yapf_format"
86
86
[project .scripts ]
87
87
pylsp = " pylsp.__main__:main"
88
88
89
+ [tool .ruff ]
90
+ # Exclude a variety of commonly ignored directories.
91
+ exclude = [
92
+ " .bzr" ,
93
+ " .direnv" ,
94
+ " .eggs" ,
95
+ " .git" ,
96
+ " .git-rewrite" ,
97
+ " .hg" ,
98
+ " .ipynb_checkpoints" ,
99
+ " .mypy_cache" ,
100
+ " .nox" ,
101
+ " .pants.d" ,
102
+ " .pyenv" ,
103
+ " .pytest_cache" ,
104
+ " .pytype" ,
105
+ " .ruff_cache" ,
106
+ " .svn" ,
107
+ " .tox" ,
108
+ " .venv" ,
109
+ " .vscode" ,
110
+ " __pypackages__" ,
111
+ " _build" ,
112
+ " buck-out" ,
113
+ " build" ,
114
+ " dist" ,
115
+ " node_modules" ,
116
+ " site-packages" ,
117
+ " venv" ,
118
+ ]
119
+
120
+ # Same as Black.
121
+ line-length = 88
122
+ indent-width = 4
123
+
124
+ # Assume Python 3.8
125
+ target-version = " py38"
126
+
127
+ [tool .ruff .lint ]
128
+ # https://docs.astral.sh/ruff/rules/
129
+ select = [" E" , " F" , " W" , " C" , " I" ]
130
+ ignore = [
131
+ " C901" , # McCabe complexity warning
132
+ " E501" , # Line too long
133
+ " E722" , # Do not use bare `except`
134
+ ]
135
+
136
+ # Allow fix for all enabled rules (when `--fix`) is provided.
137
+ fixable = [" ALL" ]
138
+ unfixable = []
139
+
140
+ # Allow unused variables when underscore-prefixed.
141
+ dummy-variable-rgx = " ^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
142
+
143
+ [tool .ruff .format ]
144
+ # Like Black, use double quotes for strings.
145
+ quote-style = " double"
146
+
147
+ # Like Black, indent with spaces, rather than tabs.
148
+ indent-style = " space"
149
+
150
+ # Like Black, respect magic trailing commas.
151
+ skip-magic-trailing-comma = false
152
+
153
+ # Like Black, automatically detect the appropriate line ending.
154
+ line-ending = " auto"
155
+
156
+ # Enable auto-formatting of code examples in docstrings. Markdown,
157
+ # reStructuredText code/literal blocks and doctests are all supported.
158
+ #
159
+ # This is currently disabled by default, but it is planned for this
160
+ # to be opt-out in the future.
161
+ docstring-code-format = false
162
+
163
+ # Set the line length limit used when formatting code snippets in
164
+ # docstrings.
165
+ #
166
+ # This only has an effect when the `docstring-code-format` setting is
167
+ # enabled.
168
+ docstring-code-line-length = " dynamic"
169
+
89
170
[tool .setuptools ]
90
171
license-files = [" LICENSE" ]
91
172
include-package-data = false
0 commit comments