Skip to content

Commit c551cc9

Browse files
committed
fix black
Signed-off-by: Xavier Dupré <[email protected]>
1 parent bdfe7a2 commit c551cc9

14 files changed

+30
-20
lines changed

benchmarks/bench_plot_onnxruntime_decision_tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def bench(n_obs, n_features, max_depths, methods, repeat=10, verbose=False):
149149
def plot_results(df, verbose=False):
150150
nrows = max(len(set(df.max_depth)) * len(set(df.n_obs)), 2)
151151
ncols = max(len(set(df.method)), 2)
152-
fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
152+
_fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
153153
pos = 0
154154
row = 0
155155
for n_obs in sorted(set(df.n_obs)):

benchmarks/bench_plot_onnxruntime_hgb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def bench(
8080

8181
for n in n_obs:
8282
for method in methods:
83-
fct1, fct2, fct3 = fcts[method]
83+
fct1, fct2, _fct3 = fcts[method]
8484

8585
if not allow_configuration(
8686
n=n,
@@ -153,7 +153,7 @@ def bench(
153153
def plot_results(df, verbose=False):
154154
nrows = max(len(set(df.max_depth)) * len(set(df.n_obs)), 2)
155155
ncols = 2
156-
fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
156+
_fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
157157
pos = 0
158158
row = 0
159159
for n_obs in sorted(set(df.n_obs)):

benchmarks/bench_plot_onnxruntime_linreg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def bench(n_obs, n_features, fit_intercepts, methods, repeat=10, verbose=False):
146146
def plot_results(df, verbose=False):
147147
nrows = max(len(set(df.fit_intercept)) * len(set(df.n_obs)), 2)
148148
ncols = max(len(set(df.method)), 2)
149-
fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
149+
_fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
150150
pos = 0
151151
row = 0
152152
for n_obs in sorted(set(df.n_obs)):

benchmarks/bench_plot_onnxruntime_logreg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def bench(n_obs, n_features, fit_intercepts, methods, repeat=10, verbose=False):
157157
def plot_results(df, verbose=False):
158158
nrows = max(len(set(df.fit_intercept)) * len(set(df.n_obs)), 2)
159159
ncols = max(len(set(df.method)), 2)
160-
fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
160+
_fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
161161
pos = 0
162162
row = 0
163163
for n_obs in sorted(set(df.n_obs)):

benchmarks/bench_plot_onnxruntime_random_forest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def bench(
166166
def plot_results(df, verbose=False):
167167
nrows = max(len(set(df.max_depth)) * len(set(df.n_obs)), 2)
168168
ncols = max(len(set(df.method)), 2)
169-
fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
169+
_fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
170170
pos = 0
171171
row = 0
172172
for n_obs in sorted(set(df.n_obs)):

benchmarks/bench_plot_onnxruntime_random_forest_reg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def bench(
204204
def plot_results(df, verbose=False):
205205
nrows = max(len(set(df.max_depth)) * len(set(df.n_obs)), 2)
206206
ncols = max(len(set(df.n_jobs)), 2)
207-
fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
207+
_fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
208208
pos = 0
209209
row = 0
210210
for n_obs in sorted(set(df.n_obs)):

benchmarks/bench_plot_onnxruntime_svm_reg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def bench(n_obs, n_features, kernels, methods, repeat=10, verbose=False):
139139
def plot_results(df, verbose=False):
140140
nrows = max(len(set(df.n_obs)), 2)
141141
ncols = 2
142-
fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
142+
_fig, ax = plt.subplots(nrows, ncols, figsize=(ncols * 4, nrows * 4))
143143
pos = 0
144144
row = 0
145145
for n_obs in sorted(set(df.n_obs)):

docs/examples/plot_custom_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def plot_embedding(Xp, y, imgs, title=None, figsize=(12, 4)):
234234
x_min, x_max = numpy.min(Xp, 0), numpy.max(Xp, 0)
235235
X = (Xp - x_min) / (x_max - x_min)
236236

237-
fig, ax = plt.subplots(1, 2, figsize=figsize)
237+
_fig, ax = plt.subplots(1, 2, figsize=figsize)
238238
for i in range(X.shape[0]):
239239
ax[0].text(
240240
X[i, 0],

docs/tests/test_documentation_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def run_test(self, fold: str, name: str, verbose=0) -> int:
4141
cmds = [sys.executable, "-u", os.path.join(fold, name)]
4242
p = subprocess.Popen(cmds, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
4343
res = p.communicate()
44-
out, err = res
44+
_out, err = res
4545
st = err.decode("ascii", errors="ignore")
4646
if st and "Traceback" in st:
4747
if '"dot" not found in path.' in st:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ select = [
9595
"B007", "B019", "B028", "B904",
9696
"C401", "C403", "C405", "C406", "C408", "C413", "C416", "C417",
9797
"PIE808", "PIE810",
98-
"RUF005", "RUF012", "RUF010", "RUF015", "RUF046", "RUF051",
98+
"RUF005", "RUF012", "RUF010", "RUF015", "RUF046", "RUF051", "RUF059",
9999
"SIM102", "SIM105", "SIM113", "SIM114", "SIM118", "SIM300", "SIM905",
100100
"UP015", "UP018", "UP028", "UP030", "UP031", "UP032"
101101
]

0 commit comments

Comments
 (0)