summaryrefslogtreecommitdiffstatshomepage
path: root/py/makemoduledefs.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-08-29 15:14:29 +1000
committerDamien George <damien@micropython.org>2020-08-29 15:18:01 +1000
commit06659077a81b85882254cf0953c33b27614e018e (patch)
treef0463060ca6144a82b0e54ffc4f394c208d4d92c /py/makemoduledefs.py
parent0c7354afaf91da3dac2c5ec471603c9e7acc8eac (diff)
downloadmicropython-06659077a81b85882254cf0953c33b27614e018e.tar.gz
micropython-06659077a81b85882254cf0953c33b27614e018e.zip
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>
Diffstat (limited to 'py/makemoduledefs.py')
-rw-r--r--py/makemoduledefs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/makemoduledefs.py b/py/makemoduledefs.py
index d718da6e02..612f3d29a3 100644
--- a/py/makemoduledefs.py
+++ b/py/makemoduledefs.py
@@ -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