]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
Improve documentation
authorHenryk Plötz <henryk@ploetzli.ch>
Sat, 11 Aug 2018 21:26:33 +0000 (23:26 +0200)
committerRaphael Michel <mail@raphaelmichel.de>
Mon, 3 Dec 2018 18:34:17 +0000 (19:34 +0100)
docs/developer.rst
fints/formals.py
fints/segments/__init__.py

index 68191ae5f240946cefa33aeea45f30eca6374e00..40051c06cddc01f9b9022ff803650bd4136db580 100644 (file)
@@ -28,6 +28,9 @@ Example usage:
    >>> FinTS3Serializer().serialize_message(s)
    b"HNHBK:1:3+000000000428+300+430711670077=043999659571CN9D=+2+430711670077=043999659571CN9D=:2'HNVSK:998:3+PIN:1+998+1+2::oIm3BlHv6mQBAADYgbPpp?+kWrAQA+1+2:2:13:@8@00000000:5:1+280:15050500:hermes:S:0:0+0'HNVSD:999:1+@195@HNSHK:2:4+PIN:1+999+9166926+1+1+2::oIm3BlHv6mQBAADYgbPpp?+kWrAQA+1+1+1:999:1+6:10:16+280:15050500:hermes:S:0:0'HIRMG:3:2+0010::Nachricht entgegengenommen.+0100::Dialog beendet.'HNSHA:4:2+9166926''HNHBS:5:1+2'"
 
+.. note::
+
+  In general parsing followed by serialization is not idempotent: A message may contain empty list elements at the end, but our parser will never generate them.
 
 FinTS Segment Sequence
 ----------------------
@@ -173,3 +176,5 @@ ____________
 .. automodule:: fints.segments
     :members:
     :inherited-members:
+    :exclude-members: print_nested
+
index aa2c53f53597c1d9095e8f13d19ae01f37de32c8..69da3678a3b3567210128df99297cce42f7162bb 100644 (file)
@@ -219,7 +219,14 @@ class ContainerField(TypedField):
     
 
 class DataElementGroupField(ContainerField):
-    pass
+    def __init__(self, *args, **kwargs):
+        super().__init__(*args, **kwargs)
+
+        if self.type is not None:
+            if not self.__doc__:
+                self.__doc__ = ""
+
+            self.__doc__ = self.__doc__ + "\n\n:type: :class:`{}.{}`".format(self.type.__module__, self.type.__name__)
 
 class GenericField(FieldRenderFormatStringMixin, DataElementField):
     type = None
index 04fa53fc177d4b3d1b2f9b4305b3caae9bf8a0b9..6202df984cd26926093be599203db5c9a9f3dbec 100644 (file)
@@ -189,4 +189,8 @@ class HIBPA3(FinTS3Segment):
     max_timeout = DataElementField(type='num', max_length=4, required=False)
 
 class HISPA1(FinTS3Segment):
+    """SEPA-Kontoverbindung anfordern, version 1
+
+    Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Messages -- Multibankfähige Geschäftsvorfälle 
+    """
     accounts = DataElementGroupField(type=AccountInternational, max_count=999, required=False)