@@ -100,7 +100,7 @@ def __init__(self, document: str, filename: Optional[str] = None, **kwargs: Any)
100
100
self .filename = filename
101
101
102
102
def __repr__ (self ) -> str :
103
- return "filename:{0 }, document:{1}" . format ( self .filename , self . document )
103
+ return f "filename:{ self . filename } , document:{ self .document } "
104
104
105
105
106
106
class DetailSchema (BaseSchema ):
@@ -134,7 +134,7 @@ def __init__(self, detail: str, **kwargs: Any) -> None:
134
134
self .detail = detail
135
135
136
136
def __repr__ (self ) -> str :
137
- return "{0 }:{1}" . format ( self .status_code , self . detail )
137
+ return f" { self . status_code } :{ self .detail } "
138
138
139
139
140
140
class MatchSchema (BaseSchema ):
@@ -185,12 +185,12 @@ def __init__(
185
185
186
186
def __repr__ (self ) -> str :
187
187
return (
188
- "match:{0 }, "
189
- "match_type:{1 }, "
190
- "line_start:{2 }, "
191
- "line_end:{3 }, "
192
- "index_start:{4 }, "
193
- "index_end:{5 }" .format (
188
+ "match:{}, "
189
+ "match_type:{}, "
190
+ "line_start:{}, "
191
+ "line_end:{}, "
192
+ "index_start:{}, "
193
+ "index_end:{}" .format (
194
194
self .match ,
195
195
self .match_type ,
196
196
repr (self .line_start ),
@@ -245,9 +245,9 @@ def is_secret(self) -> bool:
245
245
246
246
def __repr__ (self ) -> str :
247
247
return (
248
- "break_type:{0 }, "
249
- "policy:{1 }, "
250
- "matches: {2 }" .format (self .break_type , self .policy , repr (self .matches ))
248
+ "break_type:{}, "
249
+ "policy:{}, "
250
+ "matches: {}" .format (self .break_type , self .policy , repr (self .matches ))
251
251
)
252
252
253
253
@@ -319,15 +319,15 @@ def has_secrets(self) -> bool:
319
319
320
320
def __repr__ (self ) -> str :
321
321
return (
322
- "policy_break_count:{0 }, "
323
- "policies:{1 }, "
324
- "policy_breaks: {2 }" .format (
322
+ "policy_break_count:{}, "
323
+ "policies:{}, "
324
+ "policy_breaks: {}" .format (
325
325
self .policy_break_count , self .policies , self .policy_breaks
326
326
)
327
327
)
328
328
329
329
def __str__ (self ) -> str :
330
- return "{0 } policy breaks from the evaluated policies: {1 }" .format (
330
+ return "{} policy breaks from the evaluated policies: {}" .format (
331
331
self .policy_break_count ,
332
332
", " .join (policy_break .policy for policy_break in self .policy_breaks ),
333
333
)
@@ -391,10 +391,10 @@ def has_secrets(self) -> bool:
391
391
return any (scan_result .has_secrets for scan_result in self .scan_results )
392
392
393
393
def __repr__ (self ) -> str :
394
- return "scan_results:{0}" . format ( self .scan_results )
394
+ return f "scan_results:{ self .scan_results } "
395
395
396
396
def __str__ (self ) -> str :
397
- return "{0 } scan results containing {1 } policy breaks" .format (
397
+ return "{} scan results containing {} policy breaks" .format (
398
398
len (self .scan_results ),
399
399
len (
400
400
[
@@ -441,10 +441,10 @@ def __init__(
441
441
442
442
def __repr__ (self ) -> str :
443
443
return (
444
- "count:{0 }, "
445
- "limit:{1 }, "
446
- "remaining:{2 }, "
447
- "since:{3 }" .format (
444
+ "count:{}, "
445
+ "limit:{}, "
446
+ "remaining:{}, "
447
+ "since:{}" .format (
448
448
self .count , self .limit , self .remaining , self .since .isoformat ()
449
449
)
450
450
)
@@ -479,7 +479,7 @@ def __init__(self, content: Quota, **kwargs: Any) -> None:
479
479
self .content = content
480
480
481
481
def __repr__ (self ) -> str :
482
- return "content:{0}" . format ( repr (self .content ))
482
+ return f "content:{ repr (self .content )} "
483
483
484
484
485
485
class HealthCheckResponseSchema (BaseSchema ):
@@ -508,10 +508,10 @@ def __init__(
508
508
509
509
def __repr__ (self ) -> str :
510
510
return (
511
- "detail:{0 }, "
512
- "status_code:{1 }, "
513
- "app version:{2 }, "
514
- "secrets engine version:{3 }" .format (
511
+ "detail:{}, "
512
+ "status_code:{}, "
513
+ "app version:{}, "
514
+ "secrets engine version:{}" .format (
515
515
self .detail ,
516
516
self .status_code ,
517
517
self .app_version or "" ,
0 commit comments