From 70ea3725020ac9206348569f9c44eef6bb58906a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Henryk=20Pl=C3=B6tz?= Date: Fri, 10 Aug 2018 00:07:07 +0200 Subject: [PATCH] flat_length_max is not used anymore --- fints/formals.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/fints/formals.py b/fints/formals.py index 4e38232..ad78d6e 100644 --- a/fints/formals.py +++ b/fints/formals.py @@ -163,7 +163,6 @@ class Field: class TypedField(Field, SubclassesMixin): flat_length = 1 - flat_length_max = 1 def __new__(cls, *args, **kwargs): target_cls = None @@ -216,19 +215,6 @@ class ContainerField(TypedField): raise TypeError("Cannot compute flat length of field {}.{} with variable count".format(self.__class__.__name__, name)) result = result + field.count * field.flat_length return result - - @property - def flat_length_max(self): - result = 0 - for name, field in self.type._fields.items(): - # Note: We're *not* recursing into flat_length_max, because we don't want variable count fields at deeper levels - if field.count is not None: - result = result + field.count * field.flat_length - elif field.max_count is not None: - result = result + field.max_count * field.flat_length - else: - raise TypeError("Cannot compute max flat length of field {}.{} without count and max_count".format(self.__class__.__name__, name)) - return result class DataElementGroupField(ContainerField): -- 2.39.5