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:
parent
d50412c7f7
commit
6a6f15707a
1 changed files with 9945 additions and 9945 deletions
|
|
@ -17,7 +17,7 @@ Python arguments as many shell arguments, or put them in a single shell argument
|
|||
You profile is automatically set if the method requires it (using the value of ``-p
|
||||
PROFILE, --profile PROFILE``), so you must not specify it as an extra argument.
|
||||
|
||||
You can refer to `Bridge API documentation`_ to get core methods signatures
|
||||
You can refer to `bridge API documentation`_ to get core methods signatures
|
||||
|
||||
.. _Bridge API documentation: https://wiki.goffi.org/wiki/Bridge_API
|
||||
|
||||
|
|
@ -26,12 +26,12 @@ examples
|
|||
--------
|
||||
|
||||
Send a message using a single shell arguments for all Python arguments. We
|
||||
use first the method name (``messageSend``), then the required arguments (see `Bridge
|
||||
use first the method name (``message_send``), then the required arguments (see `bridge
|
||||
API documentation`_ for details), without the profile as it is automatically set. We
|
||||
specify them as Python in one shell argument, so we use single quote (``\```)first for
|
||||
s hell string, and inside it we use double quote (``"``) for Python strings::
|
||||
|
||||
$ li debug bridge method messageSend '"louise@example.org", {"": "test message"}, {}, "auto", {}'
|
||||
$ li debug bridge method message_send '"louise@example.org", {"": "test message"}, {}, "auto", {}'
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ s hell string, and inside it we use double quote (``"``) for Python strings::
|
|||
|
||||
Get version string of Libervia::
|
||||
|
||||
$ li debug bridge method getVersion
|
||||
$ li debug bridge method version_get
|
||||
|
||||
|
||||
bridge signal
|
||||
|
|
@ -56,7 +56,7 @@ Send a note with ``info`` level and hand written XMLUI. Here me use a shell vari
|
|||
store the level, so we can easily change it if we want to use an other level for tests.
|
||||
Note the use of quotes (to escape both for shell and Python)::
|
||||
|
||||
$ LEVEL='info'; li debug bridge signal -c actionNew '{"xmlui": '"'"'<?xml version="1.0" ?><sat_xmlui title="test title" type="dialog"><dialog level="'$LEVEL'" type="note"><message>test message\non\nseveral\nlines</message></dialog></sat_xmlui>'"'"'}' '""' -1
|
||||
$ LEVEL='info'; li debug bridge signal -c action_new '{"xmlui": '"'"'<?xml version="1.0" ?><sat_xmlui title="test title" type="dialog"><dialog level="'$LEVEL'" type="note"><message>test message\non\nseveral\nlines</message></dialog></sat_xmlui>'"'"'}' '""' -1
|
||||
|
||||
|
||||
monitor
|
||||
|
|
|
|||
Loading…
Reference in a new issue