Skip to content

Commit 8ca50fa

Browse files
committed
Sort the things that are safe to sort without kw_only=True
1 parent c48a6ac commit 8ca50fa

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Lib/_colorize.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ class Argparse(ThemeSection):
175175
@dataclass(frozen=True)
176176
class Difflib(ThemeSection):
177177
"""A 'git diff'-like theme for `difflib.unified_diff`."""
178+
added: str = ANSIColors.GREEN
179+
context: str = ANSIColors.RESET # context lines
178180
header: str = ANSIColors.BOLD # eg "---" and "+++" lines
179181
hunk: str = ANSIColors.CYAN # the "@@" lines
180-
context: str = ANSIColors.RESET # context lines
181-
added: str = ANSIColors.GREEN
182182
removed: str = ANSIColors.RED
183183
reset: str = ANSIColors.RESET
184184

@@ -235,10 +235,10 @@ def copy_with(
235235
self,
236236
*,
237237
argparse: Argparse | None = None,
238+
difflib: Difflib | None = None,
238239
syntax: Syntax | None = None,
239240
traceback: Traceback | None = None,
240241
unittest: Unittest | None = None,
241-
difflib: Difflib | None = None,
242242
) -> Self:
243243
"""Return a new Theme based on this instance with some sections replaced.
244244
@@ -247,10 +247,10 @@ def copy_with(
247247
"""
248248
return type(self)(
249249
argparse=argparse or self.argparse,
250+
difflib=difflib or self.difflib,
250251
syntax=syntax or self.syntax,
251252
traceback=traceback or self.traceback,
252253
unittest=unittest or self.unittest,
253-
difflib=difflib or self.difflib,
254254
)
255255

256256
@classmethod
@@ -263,10 +263,10 @@ def no_colors(cls) -> Self:
263263
"""
264264
return cls(
265265
argparse=Argparse.no_colors(),
266+
difflib=Difflib.no_colors(),
266267
syntax=Syntax.no_colors(),
267268
traceback=Traceback.no_colors(),
268269
unittest=Unittest.no_colors(),
269-
difflib=Difflib.no_colors(),
270270
)
271271

272272

0 commit comments

Comments
 (0)