From 60822efca1ce7e4b2a1c2d4f764ca5a5f2a59e18 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hanno=20B=C3=B6ck?= <990588+hannob@users.noreply.github.com> Date: Sun, 6 Apr 2025 09:21:19 +0200 Subject: [PATCH] Fix README example and remove unused "import os" (#76) The example code in the README no longer works with the latest version. A similar example in https://github.com/pretix/python-drafthorse/blob/master/tests/conftest.py exists, and uses a Decimal for doc.trade.settlement.monetary_summation.tax_total instead of a tuple. Change README example to do that as well. Also, remove an unused import ("import os"). Bug: https://github.com/pretix/python-drafthorse/issues/66 --- README.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 07cac92..064dcf3 100644 --- a/README.rst +++ b/README.rst @@ -49,7 +49,6 @@ Parsing:: Generating:: - import os from datetime import date, datetime, timezone from decimal import Decimal @@ -106,7 +105,7 @@ Generating:: li.settlement.trade_tax.type_code = "VAT" li.settlement.trade_tax.category_code = "E" li.settlement.trade_tax.rate_applicable_percent = Decimal("0.00") - li.settlement.monetary_summation.total_amount = (Decimal("999.00"), "EUR") + li.settlement.monetary_summation.total_amount = Decimal("999.00") doc.trade.items.add(li) trade_tax = ApplicableTradeTax() -- 2.47.3