Skip to content

Commit f445fa4

Browse files
committed
Pleasing black
1 parent cb760cd commit f445fa4

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

.all-contributorsrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,8 @@
735735
"research",
736736
"bug",
737737
"doc",
738-
"ideas"
738+
"ideas",
739+
"maintenance"
739740
]
740741
},
741742
{

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ This library could only exist thanks to the dedication of many volunteers around
218218
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jmunoz94"><img src="https://avatars.githubusercontent.com/u/48921408?v=4?s=100" width="100px;" alt="Jesús Alberto Muñoz Mesa"/><br /><sub><b>Jesús Alberto Muñoz Mesa</b></sub></a><br /><a href="https://github.com/py-pdf/fpdf2/commits?author=jmunoz94" title="Tests">⚠️</a> <a href="https://github.com/py-pdf/fpdf2/commits?author=jmunoz94" title="Documentation">📖</a> <a href="#translation-jmunoz94" title="Translation">🌍</a></td>
219219
<td align="center" valign="top" width="14.28%"><a href="https://jdeep.me"><img src="https://avatars.githubusercontent.com/u/64089730?v=4?s=100" width="100px;" alt="Jaydeep Das"/><br /><sub><b>Jaydeep Das</b></sub></a><br /><a href="#question-JDeepD" title="Answering Questions">💬</a></td>
220220
<td align="center" valign="top" width="14.28%"><a href="https://github.com/seanpmulholland"><img src="https://avatars.githubusercontent.com/u/79894395?v=4?s=100" width="100px;" alt="Sean"/><br /><sub><b>Sean</b></sub></a><br /><a href="https://github.com/py-pdf/fpdf2/commits?author=seanpmulholland" title="Code">💻</a></td>
221-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/andersonhc"><img src="https://avatars.githubusercontent.com/u/948125?v=4?s=100" width="100px;" alt="Anderson Herzogenrath da Costa"/><br /><sub><b>Anderson Herzogenrath da Costa</b></sub></a><br /><a href="#question-andersonhc" title="Answering Questions">💬</a> <a href="https://github.com/py-pdf/fpdf2/commits?author=andersonhc" title="Code">💻</a> <a href="#research-andersonhc" title="Research">🔬</a> <a href="https://github.com/py-pdf/fpdf2/issues?q=author%3Aandersonhc" title="Bug reports">🐛</a> <a href="https://github.com/py-pdf/fpdf2/commits?author=andersonhc" title="Documentation">📖</a> <a href="#ideas-andersonhc" title="Ideas, Planning, & Feedback">🤔</a></td>
221+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/andersonhc"><img src="https://avatars.githubusercontent.com/u/948125?v=4?s=100" width="100px;" alt="Anderson Herzogenrath da Costa"/><br /><sub><b>Anderson Herzogenrath da Costa</b></sub></a><br /><a href="#question-andersonhc" title="Answering Questions">💬</a> <a href="https://github.com/py-pdf/fpdf2/commits?author=andersonhc" title="Code">💻</a> <a href="#research-andersonhc" title="Research">🔬</a> <a href="https://github.com/py-pdf/fpdf2/issues?q=author%3Aandersonhc" title="Bug reports">🐛</a> <a href="https://github.com/py-pdf/fpdf2/commits?author=andersonhc" title="Documentation">📖</a> <a href="#ideas-andersonhc" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-Lucas-C" title="Maintenance">🚧</a></td>
222222
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yiweelan"><img src="https://avatars.githubusercontent.com/u/117787188?v=4?s=100" width="100px;" alt="Yi Wei Lan"/><br /><sub><b>Yi Wei Lan</b></sub></a><br /><a href="https://github.com/py-pdf/fpdf2/commits?author=yiweelan" title="Tests">⚠️</a></td>
223223
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Bubbu0129"><img src="https://avatars.githubusercontent.com/u/93034081?v=4?s=100" width="100px;" alt="CpDong"/><br /><sub><b>CpDong</b></sub></a><br /><a href="https://github.com/py-pdf/fpdf2/commits?author=Bubbu0129" title="Code">💻</a> <a href="https://github.com/py-pdf/fpdf2/issues?q=author%3ABubbu0129" title="Bug reports">🐛</a> <a href="#translation-Bubbu0129" title="Translation">🌍</a></td>
224224
<td align="center" valign="top" width="14.28%"><a href="https://github.com/CY-Qiu"><img src="https://avatars.githubusercontent.com/u/23075447?v=4?s=100" width="100px;" alt="CY-Qiu"/><br /><sub><b>CY-Qiu</b></sub></a><br /><a href="https://github.com/py-pdf/fpdf2/issues?q=author%3ACY-Qiu" title="Bug reports">🐛</a></td>

tutorial/csv2table.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
with open(sys.argv[1], encoding="utf-8") as csv_file:
1212
reader = csv.reader(csv_file, delimiter=",")
1313
for i, row in enumerate(reader):
14-
# We color the row based on the hexadecimal code in the 2nd column:
15-
style = FontFace(fill_color=color_from_hex_string(row[1])) if i > 0 else None
14+
style = None
15+
if i > 0:
16+
# We color the row based on the hexadecimal code in the 2nd column:
17+
style = FontFace(fill_color=color_from_hex_string(row[1]))
1618
table.row(row, style=style)
1719
pdf.output("from-csv.pdf")

tutorial/ods2table.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
with pdf.table() as table:
1717
for i, row in enumerate(sheet.getElementsByType(TableRow)):
1818
row = [str(cell) for cell in row.getElementsByType(TableCell)]
19-
# We color the row based on the hexadecimal code in the 2nd column:
20-
style = FontFace(fill_color=color_from_hex_string(row[1])) if i > 0 else None
19+
style = None
20+
if i > 0:
21+
# We color the row based on the hexadecimal code in the 2nd column:
22+
style = FontFace(fill_color=color_from_hex_string(row[1]))
2123
table.row(row, style=style)
2224
pdf.output("from-ods.pdf")

tutorial/xlsx2table.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
ws = wb.active
1515
with pdf.table() as table:
1616
for i, row in enumerate(ws.rows):
17-
# We color the row based on the hexadecimal code in the 2nd column:
18-
style = FontFace(fill_color=color_from_hex_string(row[1].value)) if i > 0 else None
17+
style = None
18+
if i > 0:
19+
# We color the row based on the hexadecimal code in the 2nd column:
20+
style = FontFace(fill_color=color_from_hex_string(row[1]))
1921
table.row([cell.value for cell in row], style=style)
2022
pdf.output("from-xlsx.pdf")

0 commit comments

Comments
 (0)