From c901bfa8e7a6f33ef7cb369995510e83cd31e52d Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Thu, 6 Aug 2020 01:06:09 +0200
Subject: Make types private

---
 fracture/invoice.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'fracture')

diff --git a/fracture/invoice.py b/fracture/invoice.py
index 754af02..84c0f9b 100644
--- a/fracture/invoice.py
+++ b/fracture/invoice.py
@@ -27,7 +27,7 @@ class Customer:
         self.address = address
 
 class Invoice:
-    TYPES  = {"sent", "received"}
+    _TYPES  = {"sent", "received"}
     SERIES = {}
     ID_FORMAT = None
     CURRENCY  = None
@@ -47,7 +47,7 @@ class Invoice:
                        taxes = None,
                        id = None):
         # Initializes to empty state if not set
-        self.set_type(type or tuple(Invoice.TYPES)[0])
+        self.set_type(type or tuple(Invoice._TYPES)[0])
         self.id       = id
         self.set_series(series or tuple(Invoice.SERIES.keys())[0])
         self.date     = idate or date.today()
@@ -65,9 +65,9 @@ class Invoice:
         self.series = series
 
     def set_type(self, type):
-        if type not in Invoice.TYPES:
+        if type not in Invoice._TYPES:
             raise ValueError ("Not valid type for Invoice. Valid are: %s"
-                    % Invoice.TYPES)
+                    % Invoice._TYPES)
         self.type = type
 
     def format_id(self):
-- 
cgit v1.2.3