File tree 3 files changed +7
-6
lines changed
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,12 @@ repos:
11
11
- id : requirements-txt-fixer
12
12
13
13
- repo : https://github.com/MarcoGorelli/auto-walrus
14
- rev : 0.3.3
14
+ rev : 0.3.4
15
15
hooks :
16
16
- id : auto-walrus
17
17
18
18
- repo : https://github.com/astral-sh/ruff-pre-commit
19
- rev : v0.4.1
19
+ rev : v0.4.2
20
20
hooks :
21
21
- id : ruff
22
22
- id : ruff-format
47
47
- id : validate-pyproject
48
48
49
49
- repo : https://github.com/pre-commit/mirrors-mypy
50
- rev : v1.9 .0
50
+ rev : v1.10 .0
51
51
hooks :
52
52
- id : mypy
53
53
args :
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ def time_solve(grid):
150
150
display (grid_values (grid ))
151
151
if values :
152
152
display (values )
153
- print ("(% .5f seconds)\n " % t )
153
+ print (f"( { t : .5f} seconds)\n " )
154
154
return (t , solved (values ))
155
155
156
156
times , results = zip (* [time_solve (grid ) for grid in grids ])
@@ -217,4 +217,4 @@ def shuffled(seq):
217
217
start = time .monotonic ()
218
218
solve (puzzle )
219
219
t = time .monotonic () - start
220
- print ("Solved: % .5f sec" % t )
220
+ print (f "Solved: { t : .5f} sec" )
Original file line number Diff line number Diff line change @@ -156,7 +156,8 @@ def __init__(
156
156
self ._rng = np .random .default_rng (seed1 if seed is None else seed2 )
157
157
dtype = dtypes .as_dtype (dtype ).base_dtype
158
158
if dtype not in (dtypes .uint8 , dtypes .float32 ):
159
- raise TypeError ("Invalid image dtype %r, expected uint8 or float32" % dtype )
159
+ msg = f"Invalid image dtype { dtype !r} , expected uint8 or float32"
160
+ raise TypeError (msg )
160
161
if fake_data :
161
162
self ._num_examples = 10000
162
163
self .one_hot = one_hot
You can’t perform that action at this time.
0 commit comments