Skip to content

Commit 269c6d0

Browse files
mergennachinfacebook-github-bot
authored andcommitted
lintrunner and internal lint fixes (#801)
Summary: Pull Request resolved: #801 Reviewed By: tarun292 Differential Revision: D50139363 fbshipit-source-id: c81d43f4f52dfbffcbbc716f82d10647512f2c3a
1 parent ab3b522 commit 269c6d0

File tree

9 files changed

+20
-13
lines changed

9 files changed

+20
-13
lines changed

bundled_program/tests/test_bundle_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def test_bundle_wrong_output_type(self) -> None:
101101
program, bundled_config = get_common_program()
102102

103103
bundled_config.execution_plan_tests[-1].test_sets[-1].expected_outputs = [
104-
0, 0.0
104+
0,
105+
0.0,
105106
]
106107
self.assertRaises(
107108
AssertionError, create_bundled_program, program, bundled_config

examples/demo-apps/android/ExecuTorchDemo/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
.cxx
1010
local.properties
1111
*.so
12-

examples/demo-apps/android/ExecuTorchDemo/app/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
19
plugins {
210
id("com.android.application")
311
id("org.jetbrains.kotlin.android")

examples/demo-apps/android/ExecuTorchDemo/settings.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pluginManagement {
1414
}
1515
}
1616

17-
1817
dependencyResolutionManagement {
1918
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
2019
repositories {
@@ -25,5 +24,4 @@ dependencyResolutionManagement {
2524

2625
rootProject.name = "ExecuTorch Demo"
2726

28-
2927
include(":app")

examples/sdk/scripts/export_bundled_program.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@
77
# Example script for exporting simple models to flatbuffer
88

99
import argparse
10+
import os
1011

1112
from typing import List
1213

1314
import torch
14-
import os
15-
from executorch.bundled_program.config import BundledConfig, MethodInputType, MethodOutputType
15+
from executorch.bundled_program.config import (
16+
BundledConfig,
17+
MethodInputType,
18+
MethodOutputType,
19+
)
1620
from executorch.bundled_program.core import create_bundled_program
1721
from executorch.bundled_program.serialize import (
1822
serialize_from_bundled_program_to_flatbuffer,
@@ -35,7 +39,7 @@ def save_bundled_program(
3539
Generates a bundled program from the given ET program and saves it to the specified path.
3640
3741
Args:
38-
program: The Executorch program to bundle.
42+
program: The ExecuTorch program to bundle.
3943
method_names: A list of method names in the program to bundle test cases.
4044
bundled_inputs: Representative inputs for each method.
4145
bundled_expected_outputs: Expected outputs of representative inputs for each method.
@@ -72,7 +76,6 @@ def export_to_bundled_program(
7276
To simplify, here we assume that all inference methods have the same inputs.
7377
"""
7478

75-
7679
print("Exporting ET program...")
7780

7881
# pyre-ignore[6]
@@ -119,7 +122,7 @@ def export_to_bundled_program(
119122
"-d",
120123
"--dir",
121124
default=".",
122-
help=f"the directory to store the exported bundled program. Default is current directory.",
125+
help="the directory to store the exported bundled program. Default is current directory.",
123126
)
124127

125128
args = parser.parse_args()

kernels/prim_ops/test/TARGETS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ cpp_unittest(
3232
"//executorch/runtime/kernel:kernel_runtime_context", # @manual
3333
"//executorch/runtime/kernel:operator_registry",
3434
"//executorch/runtime/platform:platform",
35-
"//executorch/test/utils:utils",
35+
"//executorch/test/utils:utils_aten",
3636
],
3737
)

kernels/test/gen_supported_features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def main(args: List[Any]) -> None:
9393
"""
9494
This binary generates the supported_features.h from supported_features.yaml
9595
from this (//executorch/kernels/test) directory. Then for a specific kernel,
96-
we need to supply the overriden supported_features_def.yaml for the kernel.
96+
we need to supply the overridden supported_features_def.yaml for the kernel.
9797
"""
9898
with open(args[0]) as f:
9999
y = yaml.full_load(f)

kernels/test/supported_features_summary.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ Each kernel can have its own overrides, which are defined in
1818
('portable', 'fbcode/executorch/kernels/portable/test/supported_features_def.yaml')
1919
('quantized', 'fbcode/executorch/kernels/quantized/test/supported_features_def.yaml')
2020
('custom_kernel_example', 'fbcode/executorch/kernels/test/custom_kernel_example/supported_features_def.yaml')
21-

sdk/etdump/serialize.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import json
1010
import os
1111
import tempfile
12-
from typing import Union
1312

1413
import pkg_resources
1514

0 commit comments

Comments
 (0)