diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b1aa94a0..c86ee0f43 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,6 +21,12 @@ repos: - id: black - repo: local hooks: + - id: no-print-in-sources + name: Ensure no print() statement appears in fpdf2 sources + language: pygrep + entry: print\( + files: ^fpdf/.*\.py$ + exclude: fpdf/util.py - id: no-generate-true name: Ensure no generate=True is left in a call to assert_pdf_equal() language: pygrep diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c07f1bb9..32b60074b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,10 @@ in order to get warned about deprecated features used in your code. This can also be enabled programmatically with `warnings.simplefilter('default', DeprecationWarning)`. -## [2.7.3] - Not released yet +## [2.7.4] - Not released yet + +## [2.7.3] - 2023-04-03 +- removed a debug `print()` statement left in `output.py:OutputProducer._add_fonts()` 🤦‍♂️ - A rule was also added to `.pre-commit-config.yaml` to avoid this to happen again. ## [2.7.2] - 2023-04-03 ### Fixed diff --git a/fpdf/fpdf.py b/fpdf/fpdf.py index 347a1c679..db57f2b18 100644 --- a/fpdf/fpdf.py +++ b/fpdf/fpdf.py @@ -92,7 +92,7 @@ class Image: ) # Public global variables: -FPDF_VERSION = "2.7.2" +FPDF_VERSION = "2.7.3" PAGE_FORMATS = { "a3": (841.89, 1190.55), "a4": (595.28, 841.89), diff --git a/fpdf/output.py b/fpdf/output.py index 571c0a6e4..82221e6d0 100644 --- a/fpdf/output.py +++ b/fpdf/output.py @@ -580,7 +580,6 @@ def _add_fonts(self): glyph_names = [ cmap[unicode] for unicode in uni_to_new_code_char if unicode in cmap ] - print(glyph_names) missing_glyphs = [ chr(unicode)