@@ -91,7 +91,7 @@ class Level(Enum):
91
91
WARNING = "Warning"
92
92
93
93
@property
94
- def log_level (self : Level ) -> int :
94
+ def log_level (self ) -> int :
95
95
"""Return a log level.
96
96
97
97
:returns: The log level
@@ -125,7 +125,7 @@ def longest_formatted(cls) -> int:
125
125
"""
126
126
return max (len (str (member )) for member in cls )
127
127
128
- def __str__ (self : Level ) -> str :
128
+ def __str__ (self ) -> str :
129
129
"""Return the exit message prefix as a string.
130
130
131
131
Returns:
@@ -144,7 +144,7 @@ class Msg:
144
144
prefix : Level = Level .ERROR
145
145
146
146
@property
147
- def color (self : Msg ) -> str :
147
+ def color (self ) -> str :
148
148
"""Return a color for the prefix.
149
149
150
150
:returns: The color for the prefix
@@ -161,7 +161,7 @@ def color(self: Msg) -> str:
161
161
return color_mapping [self .prefix ]
162
162
163
163
def to_lines (
164
- self : Msg ,
164
+ self ,
165
165
color : bool , # noqa: FBT001
166
166
width : int ,
167
167
with_prefix : bool , # noqa: FBT001
@@ -213,7 +213,7 @@ class Output:
213
213
"""Output functionality."""
214
214
215
215
def __init__ ( # pylint: disable=too-many-positional-arguments
216
- self : Output ,
216
+ self ,
217
217
log_file : str ,
218
218
log_level : str ,
219
219
log_append : str ,
@@ -258,7 +258,7 @@ def __init__( # pylint: disable=too-many-positional-arguments
258
258
else :
259
259
self .log_to_file = False
260
260
261
- def critical (self : Output , msg : str ) -> None :
261
+ def critical (self , msg : str ) -> None :
262
262
"""Print a critical message to the console.
263
263
264
264
Args:
@@ -268,7 +268,7 @@ def critical(self: Output, msg: str) -> None:
268
268
self .log (msg , level = Level .CRITICAL )
269
269
sys .exit (1 )
270
270
271
- def debug (self : Output , msg : str ) -> None :
271
+ def debug (self , msg : str ) -> None :
272
272
"""Print a debug message to the console.
273
273
274
274
Args:
@@ -277,7 +277,7 @@ def debug(self: Output, msg: str) -> None:
277
277
self .call_count ["debug" ] += 1
278
278
self .log (msg , level = Level .DEBUG )
279
279
280
- def error (self : Output , msg : str ) -> None :
280
+ def error (self , msg : str ) -> None :
281
281
"""Print an error message to the console.
282
282
283
283
Args:
@@ -286,7 +286,7 @@ def error(self: Output, msg: str) -> None:
286
286
self .call_count ["error" ] += 1
287
287
self .log (msg , level = Level .ERROR )
288
288
289
- def hint (self : Output , msg : str ) -> None :
289
+ def hint (self , msg : str ) -> None :
290
290
"""Print a hint message to the console.
291
291
292
292
Args:
@@ -295,7 +295,7 @@ def hint(self: Output, msg: str) -> None:
295
295
self .call_count ["hint" ] += 1
296
296
self .log (msg , level = Level .HINT )
297
297
298
- def info (self : Output , msg : str ) -> None :
298
+ def info (self , msg : str ) -> None :
299
299
"""Print a hint message to the console.
300
300
301
301
Args:
@@ -304,7 +304,7 @@ def info(self: Output, msg: str) -> None:
304
304
self .call_count ["info" ] += 1
305
305
self .log (msg , level = Level .INFO )
306
306
307
- def note (self : Output , msg : str ) -> None :
307
+ def note (self , msg : str ) -> None :
308
308
"""Print a note message to the console.
309
309
310
310
Args:
@@ -313,7 +313,7 @@ def note(self: Output, msg: str) -> None:
313
313
self .call_count ["note" ] += 1
314
314
self .log (msg , level = Level .NOTE )
315
315
316
- def warning (self : Output , msg : str ) -> None :
316
+ def warning (self , msg : str ) -> None :
317
317
"""Print a warning message to the console.
318
318
319
319
Args:
@@ -322,7 +322,7 @@ def warning(self: Output, msg: str) -> None:
322
322
self .call_count ["warning" ] += 1
323
323
self .log (msg , level = Level .WARNING )
324
324
325
- def log (self : Output , msg : str , level : Level = Level .ERROR ) -> None :
325
+ def log (self , msg : str , level : Level = Level .ERROR ) -> None :
326
326
"""Print a message to the console.
327
327
328
328
Args:
0 commit comments