Commit d33e7d31 authored by Vincent Texier's avatar Vincent Texier

[enh] enhance Readme.rst and a doctring

parent 90a88964
Pipeline #5034 passed with stages
in 4 minutes and 29 seconds
......@@ -65,7 +65,7 @@ Development
make check
* Run all unit tests with::
* Run all unit tests (builtin module unittest) with::
make tests
......@@ -76,6 +76,8 @@ Development
Documentation
-------------
When writing docstrings, use the rst format recommended by https://www.python.org/dev/peps/pep-0287/#docstring-significant-features
* Install Sphinx::
pip install -r requirements_dev.txt
......@@ -85,7 +87,7 @@ Documentation
make docs
* HTML Documentation is generated in docs/_build/html folder.
* `Examples <https://git.duniter.org/clients/python/duniterpy/tree/master/examples>`_
* `Examples are more fun than a TLTR doc <https://git.duniter.org/clients/python/duniterpy/tree/master/examples>`_
Packaging and deploy
--------------------
......
......@@ -235,22 +235,18 @@ class AsciiArmor:
def parse(ascii_armor_message: str, signing_key: Optional[SigningKey] = None,
sender_pubkeys: Optional[List[str]] = None) -> dict:
"""
Return a dict with parsed content (decrypted message, signature validation)
Return a dict with parsed content (decrypted message, signature validation) ::
{
'message':
{
'fields': {},
'content': str,
},
'signatures': [
{'pubkey': str, 'valid': bool, fields: {}}
]
}
'message':
{
'fields': {},
'content': str,
},
'signatures': [
{'pubkey': str, 'valid': bool, fields: {}}
]
}
:param ascii_armor_message: The Ascii Armor Message Block including BEGIN and END headers
:param signing_key: Optional Libnacl SigningKey instance to decrypt message
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment