1+ #!/usr/bin/env python3
2+ #
3+ # enums.py
4+ """
5+ Enum values for configuration.
6+ """
7+ #
8+ # Copyright © 2026 Dominic Davis-Foster <dominic@davis-foster.co.uk>
9+ #
10+ # Permission is hereby granted, free of charge, to any person obtaining a copy
11+ # of this software and associated documentation files (the "Software"), to deal
12+ # in the Software without restriction, including without limitation the rights
13+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+ # copies of the Software, and to permit persons to whom the Software is
15+ # furnished to do so, subject to the following conditions:
16+ #
17+ # The above copyright notice and this permission notice shall be included in all
18+ # copies or substantial portions of the Software.
19+ #
20+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
24+ # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
25+ # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
26+ # OR OTHER DEALINGS IN THE SOFTWARE.
27+ #
28+
129# stdlib
230from enum import Enum
331
4-
5- class PreferHanging (str , Enum ):
32+ __all__ = [
33+ "BracePosition" ,
34+ "ForceMultiLine" ,
35+ "JsxMultiLineParens" ,
36+ "JsxQuoteStyle" ,
37+ "MemberSpacing" ,
38+ "NamedTypeImportsExportsOrder" ,
39+ "NewLineKind" ,
40+ "NextControlFlowPosition" ,
41+ "OperatorPosition" ,
42+ "PreferHanging" ,
43+ "QuoteProps" ,
44+ "QuoteStyle" ,
45+ "SameOrNextLinePosition" ,
46+ "SemiColonOrComma" ,
47+ "SemiColons" ,
48+ "SortOrder" ,
49+ "TrailingCommas" ,
50+ "UseBraces" ,
51+ "UseParentheses" ,
52+ ]
53+
54+
55+ class PreferHanging (str , Enum ): # noqa: D101
656 #: Always prefer multi-line indentation
757 Never = "never"
858
959 #: Prefer hanging indentation for sequences with only a single item, but if there are multiple items then use multi-line indentation
10-
1160 OnlySingleItem = "onlySingleItem"
1261
1362 #: Always prefer hanging indentation
@@ -232,8 +281,10 @@ class SemiColonOrComma(str, Enum):
232281 """
233282 Whether to use semi-colons or commas.
234283 """
284+
235285 #: Use semi colons (default).
236286 SemiColon = "semiColon"
287+
237288 #: Use commas.
238289 Comma = "comma"
239290
@@ -253,13 +304,13 @@ class SortOrder(str, Enum):
253304 CaseInsensitive = "caseInsensitive"
254305
255306
256- class NamedTypeImportsExportsOrder (str , Enum ):
307+ class NamedTypeImportsExportsOrder (str , Enum ): # noqa: D101
257308 First = "first"
258309 Last = "last"
259310 _None = "none"
260311
261312
262- class NewLineKind (str , Enum ):
313+ class NewLineKind (str , Enum ): # noqa: D101
263314
264315 #: Decide which newline kind to use based on the last newline in the file.
265316 Auto = "auto"
0 commit comments