From: Henryk Plötz Date: Sat, 11 Aug 2018 21:26:33 +0000 (+0200) Subject: Improve documentation X-Git-Tag: v2.0.0~1^2~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9d04498264a797ddeb9830bffa6572bd8d328e7;p=thirdparty%2Fpython-fints.git Improve documentation --- diff --git a/docs/developer.rst b/docs/developer.rst index 68191ae..40051c0 100644 --- a/docs/developer.rst +++ b/docs/developer.rst @@ -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 + diff --git a/fints/formals.py b/fints/formals.py index aa2c53f..69da367 100644 --- a/fints/formals.py +++ b/fints/formals.py @@ -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 diff --git a/fints/segments/__init__.py b/fints/segments/__init__.py index 04fa53f..6202df9 100644 --- a/fints/segments/__init__.py +++ b/fints/segments/__init__.py @@ -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)