Skip to content

Commit 79a5658

Browse files
committed
qa: reformat with the latest black version
1 parent c0a5216 commit 79a5658

File tree

117 files changed

+267
-485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+267
-485
lines changed

examples/pandas_autofilter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
worksheet = writer.sheets["Sheet1"]
2626

2727
# Get the dimensions of the dataframe.
28-
(max_row, max_col) = df.shape
28+
max_row, max_col = df.shape
2929

3030
# Make the columns wider for clarity.
3131
worksheet.set_column(0, max_col - 1, 12)

examples/pandas_chart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
chart = workbook.add_chart({"type": "column"})
2828

2929
# Get the dimensions of the dataframe.
30-
(max_row, max_col) = df.shape
30+
max_row, max_col = df.shape
3131

3232
# Configure the series of the chart from the dataframe data.
3333
chart.add_series({"values": ["Sheet1", 1, 1, max_row, 1]})

examples/pandas_chart_line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
worksheet = writer.sheets[sheet_name]
3636

3737
# Get the dimensions of the dataframe.
38-
(max_row, max_col) = df.shape
38+
max_row, max_col = df.shape
3939

4040
# Create a chart object.
4141
chart = workbook.add_chart({"type": "line"})

examples/pandas_conditional_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
worksheet = writer.sheets["Sheet1"]
2525

2626
# Get the dimensions of the dataframe.
27-
(max_row, max_col) = df.shape
27+
max_row, max_col = df.shape
2828

2929
# Apply a conditional format to the required cell range.
3030
worksheet.conditional_format(1, max_col, max_row, max_col, {"type": "3_color_scale"})

examples/pandas_datetime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
worksheet = writer.sheets["Sheet1"]
5151

5252
# Get the dimensions of the dataframe.
53-
(max_row, max_col) = df.shape
53+
max_row, max_col = df.shape
5454

5555
# Set the column widths, to make the dates clearer.
5656
worksheet.set_column(1, max_col, 20)

examples/pandas_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
worksheet = writer.sheets["Sheet1"]
3838

3939
# Get the dimensions of the dataframe.
40-
(max_row, max_col) = df.shape
40+
max_row, max_col = df.shape
4141

4242
# Create a list of column headers, to use in add_table().
4343
column_settings = [{"header": column} for column in df.columns]

examples/polars_chart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
chart = workbook.add_chart({"type": "column"})
2626

2727
# Get the dimensions of the dataframe.
28-
(max_row, max_col) = df.shape
28+
max_row, max_col = df.shape
2929

3030
# Configure the series of the chart from the dataframe data.
3131
chart.add_series({"values": ["Sheet1", 1, max_col - 1, max_row, max_col - 1]})

xlsxwriter/comments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _set_user_options(
140140
# Convert a cell reference to a row and column.
141141
start_cell = options.get("start_cell")
142142
if start_cell and isinstance(start_cell, str):
143-
(start_row, start_col) = xl_cell_to_rowcol(start_cell)
143+
start_row, start_col = xl_cell_to_rowcol(start_cell)
144144
self.start_row = start_row
145145
self.start_col = start_col
146146

xlsxwriter/image.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,22 +192,22 @@ def _get_image_properties(self) -> None:
192192
emf_marker1 = unpack("<L", data[:4])[0]
193193

194194
if png_marker == b"PNG":
195-
(image_type, width, height, x_dpi, y_dpi) = self._process_png(data)
195+
image_type, width, height, x_dpi, y_dpi = self._process_png(data)
196196

197197
elif jpg_marker == 0xFFD8:
198-
(image_type, width, height, x_dpi, y_dpi) = self._process_jpg(data)
198+
image_type, width, height, x_dpi, y_dpi = self._process_jpg(data)
199199

200200
elif bmp_marker == b"BM":
201-
(image_type, width, height) = self._process_bmp(data)
201+
image_type, width, height = self._process_bmp(data)
202202

203203
elif emf_marker1 == 0x9AC6CDD7:
204-
(image_type, width, height, x_dpi, y_dpi) = self._process_wmf(data)
204+
image_type, width, height, x_dpi, y_dpi = self._process_wmf(data)
205205

206206
elif emf_marker1 == 1 and emf_marker == b" EMF":
207-
(image_type, width, height, x_dpi, y_dpi) = self._process_emf(data)
207+
image_type, width, height, x_dpi, y_dpi = self._process_emf(data)
208208

209209
elif gif_marker == b"GIF8":
210-
(image_type, width, height, x_dpi, y_dpi) = self._process_gif(data)
210+
image_type, width, height, x_dpi, y_dpi = self._process_gif(data)
211211

212212
else:
213213
raise UnsupportedImageFormat(

xlsxwriter/packager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def _filename(self, xml_filename):
172172
if self.in_memory:
173173
os_filename = StringIO()
174174
else:
175-
(fd, os_filename) = tempfile.mkstemp(dir=self.tmpdir)
175+
fd, os_filename = tempfile.mkstemp(dir=self.tmpdir)
176176
os.close(fd)
177177

178178
self.filenames.append((os_filename, xml_filename, False))

0 commit comments

Comments
 (0)