RelayModelInfo: support non-tensor outputs #386
style.yml
on: push
Run linters
13s
Check for License headers
6s
Annotations
5 errors and 1 warning
mlonmcu/feature/features.py#L1536
Do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()` (E721)
|
tests/unit-tests/test_setup.py#L82
Line too long (125 > 120 characters) (E501)
|
/home/runner/work/mlonmcu/mlonmcu/mlonmcu/setup/tasks/dtc.py#L40
@Tasks.provides(["dtc.src_dir"])
@Tasks.validate(_validate_dtc)
@Tasks.register(category=TaskType.MISC)
-def clone_dtc(
- context: MlonMcuContext, params=None, rebuild=False, verbose=False, threads=multiprocessing.cpu_count()
-):
+def clone_dtc(context: MlonMcuContext, params=None, rebuild=False, verbose=False, threads=multiprocessing.cpu_count()):
"""Clone the dtc repo."""
name = utils.makeDirName("dtc")
srcDir = context.environment.paths["deps"].path / "src" / name
user_vars = context.environment.vars
if "dtc.src_dir" in user_vars: # TODO: also check command line flags?
|
/home/runner/work/mlonmcu/mlonmcu/mlonmcu/setup/tasks/dtc.py#L59
@Tasks.needs(["dtc.src_dir"])
@Tasks.provides(["dtc.install_dir", "dtc.build_dir", "dtc.exe"])
@Tasks.validate(_validate_dtc)
@Tasks.register(category=TaskType.MISC)
-def build_dtc(
- context: MlonMcuContext, params=None, rebuild=False, verbose=False, threads=multiprocessing.cpu_count()
-):
+def build_dtc(context: MlonMcuContext, params=None, rebuild=False, verbose=False, threads=multiprocessing.cpu_count()):
"""Build the device tree compile."""
if not params:
params = {}
user_vars = context.environment.vars
if "dtc.exe" in user_vars: # TODO: also check command line flags?
|
/home/runner/work/mlonmcu/mlonmcu/tests/unit-tests/test_setup.py#L77
TestTaskFactory.registry["example_task1"] = mock.Mock(return_value=True)
# example_task2_mock = mock.Mock(return_value=True)
TestTaskFactory.registry["example_task2"] = mock.Mock(return_value=True)
config = {"print_output": print_output}
installer = Setup(config=config, context=fake_context, tasks_factory=TestTaskFactory)
- result = installer.install_dependencies(progress=progress, write_cache=write_cache, write_env=write_env, rebuild=rebuild)
+ result = installer.install_dependencies(
+ progress=progress, write_cache=write_cache, write_env=write_env, rebuild=rebuild
+ )
assert result
# assert example_task1_mock.call_count == 3
assert (
TestTaskFactory.registry["example_task1"].call_count == 1
) # Due to the mock, the actual wrapper is not executed anymore, params are not considered etc
|
Run linters
The following actions uses node12 which is deprecated and will be forced to run on node16: wearerequired/lint-action@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|