Skip to content

Commit 25d8a04

Browse files
authored
[lint] Remove unnecessary BUCKRESTRICTEDSYNTAX suppressions
Differential Revision: D59935630 Pull Request resolved: pytorch#131187
1 parent a6a2cd6 commit 25d8a04

14 files changed

+4
-27
lines changed

buckbuild.bzl

-5
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ load(
5353
)
5454

5555
def read_bool(section, field, default, required = True):
56-
# @lint-ignore BUCKRESTRICTEDSYNTAX
5756
val = read_config(section, field)
5857
if val != None:
5958
if val in ["true", "True", "1"]:
@@ -147,7 +146,6 @@ def get_glsl_paths():
147146
def spv_shader_library():
148147
pass
149148

150-
# @lint-ignore BUCKRESTRICTEDSYNTAX
151149
IS_OSS = read_config("pt", "is_oss", "0") == "1" # True for OSS BUCK build, and False for internal BUCK build
152150

153151
NOT_OSS = not IS_OSS
@@ -847,7 +845,6 @@ def define_buck_targets(
847845
# @lint-ignore BUCKLINT
848846
fb_native.filegroup(
849847
name = "metal_build_srcs",
850-
# @lint-ignore BUCKRESTRICTEDSYNTAX
851848
srcs = glob(METAL_SOURCE_LIST),
852849
visibility = [
853850
"PUBLIC",
@@ -858,7 +855,6 @@ def define_buck_targets(
858855
fb_native.filegroup(
859856
name = "templated_selective_build_srcs",
860857
# NB: no glob here, there are generated targets in this list!
861-
# @lint-ignore BUCKRESTRICTEDSYNTAX
862858
srcs = glob(TEMPLATE_SOURCE_LIST) + aten_ufunc_generated_all_cpu_sources(":gen_aten[{}]"),
863859
visibility = [
864860
"PUBLIC",
@@ -1044,7 +1040,6 @@ def define_buck_targets(
10441040
srcs = [
10451041
"aten/src/ATen/native/native_functions.yaml",
10461042
"aten/src/ATen/native/tags.yaml",
1047-
# @lint-ignore BUCKRESTRICTEDSYNTAX
10481043
] + glob(["aten/src/ATen/templates/*"]),
10491044
visibility = [
10501045
"PUBLIC",

pt_ops.bzl

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
33
load("//tools/build_defs:fb_xplat_genrule.bzl", "fb_xplat_genrule")
44
load("//tools/build_defs:type_defs.bzl", "is_list", "is_string")
55

6-
# @lint-ignore BUCKRESTRICTEDSYNTAX
76
IS_OSS = read_config("pt", "is_oss", "0") == "1" # True for OSS BUCK build, and False for internal BUCK build
87

98
USED_PT_BACKENDS = [

third_party/kineto.buck.bzl

-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ def define_kineto():
9494
"kineto/libkineto/include",
9595
"kineto/libkineto/src",
9696
],
97-
# @lint-ignore BUCKRESTRICTEDSYNTAX
9897
raw_headers = glob([
9998
"kineto/libkineto/include/*.h",
10099
"kineto/libkineto/src/*.h",
@@ -138,7 +137,6 @@ def define_kineto():
138137
"kineto/libkineto/include",
139138
"kineto/libkineto/src",
140139
],
141-
# @lint-ignore BUCKRESTRICTEDSYNTAX
142140
raw_headers = glob([
143141
"kineto/libkineto/include/*.h",
144142
"kineto/libkineto/src/*.h",

tools/BUCK.bzl

+1-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def define_tools_targets(
2626

2727
python_library(
2828
name = "jit",
29-
# @lint-ignore BUCKRESTRICTEDSYNTAX
3029
srcs = glob([
3130
"jit/*.py",
3231
"jit/templates/*",
@@ -110,10 +109,7 @@ def define_tools_targets(
110109

111110
python_library(
112111
name = "autograd",
113-
# @lint-ignore BUCKRESTRICTEDSYNTAX
114-
srcs = glob(
115-
["autograd/*.py"],
116-
),
112+
srcs = glob(["autograd/*.py"]),
117113
base_module = "tools",
118114
resources = [
119115
"autograd/deprecated.yaml",

tools/build_defs/android/build_mode_defs.bzl

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
21
def is_production_build():
32
if read_config("pt", "is_oss", "0") == "0":
43
fail("This file is for open source pytorch build. Do not use it in fbsource!")

tools/build_defs/apple/build_mode_defs.bzl

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
21
def is_production_build():
32
if read_config("pt", "is_oss", "0") == "0":
43
fail("This file is for open source pytorch build. Do not use it in fbsource!")

tools/build_defs/default_platform_defs.bzl

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Only used for PyTorch open source BUCK build
2-
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
32

43
def compose_platform_setting_list(settings):
54
"""Settings object:

tools/build_defs/fb_native_wrapper.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Only used for PyTorch open source BUCK build
2-
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
2+
33
def _genrule(default_outs = ["."], **kwargs):
44
if read_config("pt", "is_oss", "0") == "0":
55
fail("This file is for open source pytorch build. Do not use it in fbsource!")

tools/build_defs/fb_xplat_cxx_library.bzl

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Only used for PyTorch open source BUCK build
2-
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
32

4-
load(
5-
":buck_helpers.bzl",
6-
"filter_attributes",
7-
)
3+
load(":buck_helpers.bzl", "filter_attributes")
84

95
def fb_xplat_cxx_library(
106
name,

tools/build_defs/fb_xplat_cxx_test.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Only used for PyTorch open source BUCK build
2-
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
2+
33
load(":buck_helpers.bzl", "filter_attributes")
44

55
def fb_xplat_cxx_test(

tools/build_defs/fb_xplat_genrule.bzl

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Only used for PyTorch open source BUCK build
2-
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
32

43
def fb_xplat_genrule(default_outs = ["."], apple_sdks = None, **kwargs):
54
if read_config("pt", "is_oss", "0") == "0":

tools/build_defs/fbsource_utils.bzl

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Only used for PyTorch open source BUCK build
2-
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
32

43
def is_arvr_mode():
54
if read_config("pt", "is_oss", "0") == "0":

tools/build_defs/select.bzl

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Only used for PyTorch open source BUCK build
2-
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
32

43
def select(conditions):
54
if read_config("pt", "is_oss", "0") == "0":

tools/build_defs/windows/windows_flag_map.bzl

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Only used for PyTorch open source BUCK build
2-
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
32

43
def windows_convert_gcc_clang_flags(flags = []):
54
if read_config("pt", "is_oss", "0") == "0":

0 commit comments

Comments
 (0)