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
|
|
@ -67,7 +67,7 @@ def logError(failure_):
|
|||
|
||||
def partial(func, *fixed_args, **fixed_kwargs):
|
||||
# FIXME: temporary hack to workaround the fact that inspect.getargspec is not working with functools.partial
|
||||
# making partial unusable with current D-bus module (in addMethod).
|
||||
# making partial unusable with current D-bus module (in add_method).
|
||||
# Should not be needed anywore once moved to Python 3
|
||||
|
||||
ori_args = inspect.getargspec(func).args
|
||||
|
|
@ -93,7 +93,7 @@ def partial(func, *fixed_args, **fixed_kwargs):
|
|||
return method
|
||||
|
||||
|
||||
def asDeferred(func, *args, **kwargs):
|
||||
def as_deferred(func, *args, **kwargs):
|
||||
"""Call a method and return a Deferred
|
||||
|
||||
the method can be a simple callable, a Deferred or a coroutine.
|
||||
|
|
@ -184,7 +184,7 @@ def parse_xmpp_date(
|
|||
return dt.timestamp()
|
||||
|
||||
|
||||
def generatePassword(vocabulary=None, size=20):
|
||||
def generate_password(vocabulary=None, size=20):
|
||||
"""Generate a password with random characters.
|
||||
|
||||
@param vocabulary(iterable): characters to use to create password
|
||||
|
|
@ -199,7 +199,7 @@ def generatePassword(vocabulary=None, size=20):
|
|||
return "".join([random.choice(vocabulary) for i in range(15)])
|
||||
|
||||
|
||||
def getRepositoryData(module, as_string=True, is_path=False):
|
||||
def get_repository_data(module, as_string=True, is_path=False):
|
||||
"""Retrieve info on current mecurial repository
|
||||
|
||||
Data is gotten by using the following methods, in order:
|
||||
|
|
|
|||
Loading…
Reference in a new issue