[lint] Remove unnecessary BUCKRESTRICTEDSYNTAX suppressions

Differential Revision: D59935630

Pull Request resolved: https://github.com/pytorch/pytorch/pull/131187
This commit is contained in:
Andres Suarez
2024-07-19 10:19:11 -04:00
committed by GitHub
parent a6a2cd6257
commit 25d8a0480b
14 changed files with 4 additions and 27 deletions

View File

@ -53,7 +53,6 @@ load(
)
def read_bool(section, field, default, required = True):
# @lint-ignore BUCKRESTRICTEDSYNTAX
val = read_config(section, field)
if val != None:
if val in ["true", "True", "1"]:
@ -147,7 +146,6 @@ def get_glsl_paths():
def spv_shader_library():
pass
# @lint-ignore BUCKRESTRICTEDSYNTAX
IS_OSS = read_config("pt", "is_oss", "0") == "1" # True for OSS BUCK build, and False for internal BUCK build
NOT_OSS = not IS_OSS
@ -847,7 +845,6 @@ def define_buck_targets(
# @lint-ignore BUCKLINT
fb_native.filegroup(
name = "metal_build_srcs",
# @lint-ignore BUCKRESTRICTEDSYNTAX
srcs = glob(METAL_SOURCE_LIST),
visibility = [
"PUBLIC",
@ -858,7 +855,6 @@ def define_buck_targets(
fb_native.filegroup(
name = "templated_selective_build_srcs",
# NB: no glob here, there are generated targets in this list!
# @lint-ignore BUCKRESTRICTEDSYNTAX
srcs = glob(TEMPLATE_SOURCE_LIST) + aten_ufunc_generated_all_cpu_sources(":gen_aten[{}]"),
visibility = [
"PUBLIC",
@ -1044,7 +1040,6 @@ def define_buck_targets(
srcs = [
"aten/src/ATen/native/native_functions.yaml",
"aten/src/ATen/native/tags.yaml",
# @lint-ignore BUCKRESTRICTEDSYNTAX
] + glob(["aten/src/ATen/templates/*"]),
visibility = [
"PUBLIC",

View File

@ -3,7 +3,6 @@ load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
load("//tools/build_defs:fb_xplat_genrule.bzl", "fb_xplat_genrule")
load("//tools/build_defs:type_defs.bzl", "is_list", "is_string")
# @lint-ignore BUCKRESTRICTEDSYNTAX
IS_OSS = read_config("pt", "is_oss", "0") == "1" # True for OSS BUCK build, and False for internal BUCK build
USED_PT_BACKENDS = [

View File

@ -94,7 +94,6 @@ def define_kineto():
"kineto/libkineto/include",
"kineto/libkineto/src",
],
# @lint-ignore BUCKRESTRICTEDSYNTAX
raw_headers = glob([
"kineto/libkineto/include/*.h",
"kineto/libkineto/src/*.h",
@ -138,7 +137,6 @@ def define_kineto():
"kineto/libkineto/include",
"kineto/libkineto/src",
],
# @lint-ignore BUCKRESTRICTEDSYNTAX
raw_headers = glob([
"kineto/libkineto/include/*.h",
"kineto/libkineto/src/*.h",

View File

@ -26,7 +26,6 @@ def define_tools_targets(
python_library(
name = "jit",
# @lint-ignore BUCKRESTRICTEDSYNTAX
srcs = glob([
"jit/*.py",
"jit/templates/*",
@ -110,10 +109,7 @@ def define_tools_targets(
python_library(
name = "autograd",
# @lint-ignore BUCKRESTRICTEDSYNTAX
srcs = glob(
["autograd/*.py"],
),
srcs = glob(["autograd/*.py"]),
base_module = "tools",
resources = [
"autograd/deprecated.yaml",

View File

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

View File

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

View File

@ -1,5 +1,4 @@
# Only used for PyTorch open source BUCK build
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
def compose_platform_setting_list(settings):
"""Settings object:

View File

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

View File

@ -1,10 +1,6 @@
# Only used for PyTorch open source BUCK build
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
load(
":buck_helpers.bzl",
"filter_attributes",
)
load(":buck_helpers.bzl", "filter_attributes")
def fb_xplat_cxx_library(
name,

View File

@ -1,5 +1,5 @@
# Only used for PyTorch open source BUCK build
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
load(":buck_helpers.bzl", "filter_attributes")
def fb_xplat_cxx_test(

View File

@ -1,5 +1,4 @@
# Only used for PyTorch open source BUCK build
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
def fb_xplat_genrule(default_outs = ["."], apple_sdks = None, **kwargs):
if read_config("pt", "is_oss", "0") == "0":

View File

@ -1,5 +1,4 @@
# Only used for PyTorch open source BUCK build
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
def is_arvr_mode():
if read_config("pt", "is_oss", "0") == "0":

View File

@ -1,5 +1,4 @@
# Only used for PyTorch open source BUCK build
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
def select(conditions):
if read_config("pt", "is_oss", "0") == "0":

View File

@ -1,5 +1,4 @@
# Only used for PyTorch open source BUCK build
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
def windows_convert_gcc_clang_flags(flags = []):
if read_config("pt", "is_oss", "0") == "0":