change Payment.from_toml to private
authorJacob Lifshay <programmerjake@gmail.com>
Tue, 8 Sep 2020 02:05:34 +0000 (19:05 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Tue, 8 Sep 2020 02:05:34 +0000 (19:05 -0700)
src/budget_sync/budget_graph.py

index e713935..dd59fd4 100644 (file)
@@ -109,7 +109,7 @@ class Payment:
         return PayeeState.NotYetSubmitted
 
     @staticmethod
-    def from_toml(node: "Node", payee_key: str, toml_value: Any):
+    def _from_toml(node: "Node", payee_key: str, toml_value: Any) -> "Payment":
         paid = None
         submitted = None
         known_keys = ("paid", "submitted", "amount")
@@ -222,7 +222,7 @@ class Node:
             if not isinstance(key, str):
                 raise BudgetGraphPayeesParseError(
                     self.bug.id, f"key is not a string: {key!r}")
-            retval[key] = Payment.from_toml(self, key, value)
+            retval[key] = Payment._from_toml(self, key, value)
         return retval
 
     @property