Skip to content

lint code

lint code #35

GitHub Actions / Black failed Mar 14, 2024 in 0s

5 errors

Black found 5 errors

Annotations

Check failure on line 59 in /home/runner/work/seal5/seal5/examples/demo.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/seal5/seal5/examples/demo.py#L46-L59

 seal5_flow.clean(temp=True, patches=True, models=True, inputs=True, interactive=INTERACTIVE)
 
 # Clone LLVM and init seal5 metadata directory
 seal5_flow.initialize(
     clone=True,
-    clone_url="[email protected]:de-tum-ei-eda-esl/llvm/core-v-llvm-project.git"
-    if PREPATCHED
-    else "https://github.com/llvm/llvm-project.git",
+    clone_url=(
+        "[email protected]:de-tum-ei-eda-esl/llvm/core-v-llvm-project.git"
+        if PREPATCHED
+        else "https://github.com/llvm/llvm-project.git"
+    ),
     # clone_ref="llvmorg-17.0.6",
     clone_ref="seal5-demo-prepatched" if PREPATCHED else "llvmorg-18.1.0-rc3",
     force=True,
     verbose=VERBOSE,
 )

Check failure on line 122 in /home/runner/work/seal5/seal5/seal5/backends/patterngen/writer.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/seal5/seal5/seal5/backends/patterngen/writer.py#L112-L122

             artifacts[set_name] = []
             metrics["n_sets"] += 1
             ext_settings = set_def.settings
             set_dir = out_path / set_name
             includes = []
+
             def process_instrunction(instr_def):
                 metrics["n_instructions"] += 1
                 input_file = out_path / set_name / f"{instr_def.name}.core_desc"
                 attrs = instr_def.attributes
                 if len(attrs) > 0:

Check failure on line 189 in /home/runner/work/seal5/seal5/seal5/backends/patterngen/writer.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/seal5/seal5/seal5/backends/patterngen/writer.py#L179-L189

                         metrics["n_failed"] += 1
                 except AssertionError:
                     metrics["n_failed"] += 1
                     # errs.append((insn_name, str(ex)))
                 return True
+
             with ThreadPoolExecutor(args.parallel) as executor:
                 futures = []
                 for instr_def in set_def.instructions.values():
                     future = executor.submit(process_instrunction, instr_def)
                     futures.append(future)

Check failure on line 171 in /home/runner/work/seal5/seal5/seal5/flow.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/seal5/seal5/seal5/flow.py#L160-L171

             ("collect_immediate_operands", passes.collect_immediate_operands, {}),
             ("collect_operand_types", passes.collect_operand_types, {}),
             ("detect_side_effects", passes.detect_side_effects, {}),
             ("detect_inouts", passes.detect_inouts, {}),
             ("detect_registers", passes.detect_registers, {}),
-            ("write_cdsl_full", passes.write_cdsl, {"split": False, "compat": False})
+            ("write_cdsl_full", passes.write_cdsl, {"split": False, "compat": False}),
             # TODO: determine static constraints (xlen,...) -> subtargetvmap
             # detect memory adressing modes
             # self.detect_adressing_modes(verbose)  # TODO
             # detect legal GMIR ops (and map to selectiondag?)
             # self.detect_legal_ops(verbose=verbose)  # TODO

Check failure on line 814 in /home/runner/work/seal5/seal5/seal5/pass_list.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/seal5/seal5/seal5/pass_list.py#L804-L814

     if gen_index_file:
         index_file = settings.temp_dir / (new_name + "_tblgen_patterns_index.yml")
         args.extend(["--index", index_file])
     if parallel:
         import multiprocessing
+
         num_threads = multiprocessing.cpu_count()
         args.extend(["--parallel", str(num_threads)])
     utils.python(
         "-m",
         "seal5.backends.patterngen.writer",