Skip to content

Commit

Permalink
Formatting with Flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
JanmanX committed Aug 6, 2020
1 parent 2dc9b9c commit d9333cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions pyvat/vat_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from .vat_charge import VatCharge, VatChargeAction
from .utils import ensure_decimal


JANUARY_1_2015 = datetime.date(2015, 1, 1)


Expand Down Expand Up @@ -93,7 +92,7 @@ def get_sale_to_country_vat_charge(self,
# if the buyer is a consumer, we must charge VAT in the buyer's country
# of residence.
if seller.country_code == buyer.country_code or \
(not buyer.is_business and date >= JANUARY_1_2015):
(not buyer.is_business and date >= JANUARY_1_2015):
return VatCharge(VatChargeAction.charge,
buyer.country_code,
self.get_vat_rate(item_type))
Expand Down Expand Up @@ -249,7 +248,8 @@ def get_vat_rate(self, item_type):
'DE': DeVatRules(),
'DK': ConstantEuVatRateRules(25),
'EE': ConstantEuVatRateRules(20),
'EL': ElVatRules(), 'GR': ElVatRules(), # Synonymous country code for Greece
'EL': ElVatRules(),
'GR': ElVatRules(), # Synonymous country code for Greece
'ES': EsVatRules(),
'FI': ConstantEuVatRateRules(24),
'FR': FrVatRules(),
Expand All @@ -271,7 +271,6 @@ def get_vat_rate(self, item_type):
'SI': ConstantEuVatRateRules(22),
}


"""VAT rules by country.
Maps an ISO 3316 alpha-2 country code to the VAT rules applicable in the given
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sale_vat_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
ItemType.ebook: Decimal(24),
ItemType.enewspaper: Decimal(24),
},
'GR': { # Synonymous for "EL" -- Greece
'GR': { # Synonymous for "EL" -- Greece
ItemType.generic_physical_good: Decimal(24),
ItemType.generic_electronic_service: Decimal(24),
ItemType.generic_telecommunications_service: Decimal(24),
Expand Down

0 comments on commit d9333cc

Please sign in to comment.