all: Update Python code to conform to latest black formatting.
Updating to Black v20.8b1 there are two changes that affect the code in this repository: - If there is a trailing comma in a list (eg [], () or function call) then that list is now written out with one line per element. So remove such trailing commas where the list should stay on one line. - Spaces at the start of """ doc strings are removed. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -17,7 +17,7 @@ pattern = re.compile(r"[\n;]\s*MP_REGISTER_MODULE\((.*?),\s*(.*?),\s*(.*?)\);",
|
||||
|
||||
|
||||
def find_c_file(obj_file, vpath):
|
||||
""" Search vpaths for the c file that matches the provided object_file.
|
||||
"""Search vpaths for the c file that matches the provided object_file.
|
||||
|
||||
:param str obj_file: object file to find the matching c file for
|
||||
:param List[str] vpath: List of base paths, similar to gcc vpath
|
||||
@@ -36,7 +36,7 @@ def find_c_file(obj_file, vpath):
|
||||
|
||||
|
||||
def find_module_registrations(c_file):
|
||||
""" Find any MP_REGISTER_MODULE definitions in the provided c file.
|
||||
"""Find any MP_REGISTER_MODULE definitions in the provided c file.
|
||||
|
||||
:param str c_file: path to c file to check
|
||||
:return: List[(module_name, obj_module, enabled_define)]
|
||||
@@ -52,7 +52,7 @@ def find_module_registrations(c_file):
|
||||
|
||||
|
||||
def generate_module_table_header(modules):
|
||||
""" Generate header with module table entries for builtin modules.
|
||||
"""Generate header with module table entries for builtin modules.
|
||||
|
||||
:param List[(module_name, obj_module, enabled_define)] modules: module defs
|
||||
:return: None
|
||||
|
||||
Reference in New Issue
Block a user