massive refactoring to switch from camelCase to snake_case:

historically, Libervia (SàT before) was using camelCase as allowed by PEP8 when using a
pre-PEP8 code, to use the same coding style as in Twisted.

However, snake_case is more readable and it's better to follow PEP8 best practices, so it
has been decided to move on full snake_case. Because Libervia has a huge codebase, this
ended with a ugly mix of camelCase and snake_case.

To fix that, this patch does a big refactoring by renaming every function and method
(including bridge) that are not coming from Twisted or Wokkel, to use fully snake_case.

This is a massive change, and may result in some bugs.
This commit is contained in:
Goffi 2023-04-08 13:54:42 +02:00
commit 6a6f15707a

View file

@ -384,7 +384,7 @@ like this:
The encoding is explained in the documentation of the following method:
.. automethod:: sat.plugins.plugin_comp_ap_gateway.APGateway.getJIDAndNode
.. automethod:: sat.plugins.plugin_comp_ap_gateway.APGateway.get_jid_and_node
.. [#AP_chars] Most if not all AP implementations use webfinger `acct` URI as a de-facto
@ -859,10 +859,10 @@ Using the Component (for developers)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Publication of AP items can be tested using the following method (with can be accessed
through the ``APSend`` bridge method, client is then replaced by the ``profile`` name, as
through the ``ap_send`` bridge method, client is then replaced by the ``profile`` name, as
last argument):
.. automethod:: sat.plugins.plugin_comp_ap_gateway.APGateway.publishMessage
.. automethod:: sat.plugins.plugin_comp_ap_gateway.APGateway.publish_message
The method can be used either with CLI's :ref:`debug bridge method
<li_debug_bridge_method>` or with any D-Bus tool like ``qdbus`` or ``d-feet`` (only if you
@ -875,7 +875,7 @@ On its ``example.net`` Mastodon instance, Pierre has published a message with th
``https://example.net/@pierre/106986412193109832``. To send a reply to this message,
Louise can use the following command::
$ li debug bridge method -c APSend '"{\"node\": \"https://example.net/@pierre/106986412193109832\", \"content\": \"A lille hello from XMPP\"}","pierre\\40example.net@ap.example.org", "louise"'
$ li debug bridge method -c ap_send '"{\"node\": \"https://example.net/@pierre/106986412193109832\", \"content\": \"A lille hello from XMPP\"}","pierre\\40example.net@ap.example.org", "louise"'
Note the double escaping, one for the shell argument, and the other to specify JSON
object.