mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[lint] Remove unnecessary BUCKRESTRICTEDSYNTAX suppressions
Differential Revision: D59935630 Pull Request resolved: https://github.com/pytorch/pytorch/pull/131187
This commit is contained in:
@ -53,7 +53,6 @@ load(
|
|||||||
)
|
)
|
||||||
|
|
||||||
def read_bool(section, field, default, required = True):
|
def read_bool(section, field, default, required = True):
|
||||||
# @lint-ignore BUCKRESTRICTEDSYNTAX
|
|
||||||
val = read_config(section, field)
|
val = read_config(section, field)
|
||||||
if val != None:
|
if val != None:
|
||||||
if val in ["true", "True", "1"]:
|
if val in ["true", "True", "1"]:
|
||||||
@ -147,7 +146,6 @@ def get_glsl_paths():
|
|||||||
def spv_shader_library():
|
def spv_shader_library():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# @lint-ignore BUCKRESTRICTEDSYNTAX
|
|
||||||
IS_OSS = read_config("pt", "is_oss", "0") == "1" # True for OSS BUCK build, and False for internal BUCK build
|
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
|
NOT_OSS = not IS_OSS
|
||||||
@ -847,7 +845,6 @@ def define_buck_targets(
|
|||||||
# @lint-ignore BUCKLINT
|
# @lint-ignore BUCKLINT
|
||||||
fb_native.filegroup(
|
fb_native.filegroup(
|
||||||
name = "metal_build_srcs",
|
name = "metal_build_srcs",
|
||||||
# @lint-ignore BUCKRESTRICTEDSYNTAX
|
|
||||||
srcs = glob(METAL_SOURCE_LIST),
|
srcs = glob(METAL_SOURCE_LIST),
|
||||||
visibility = [
|
visibility = [
|
||||||
"PUBLIC",
|
"PUBLIC",
|
||||||
@ -858,7 +855,6 @@ def define_buck_targets(
|
|||||||
fb_native.filegroup(
|
fb_native.filegroup(
|
||||||
name = "templated_selective_build_srcs",
|
name = "templated_selective_build_srcs",
|
||||||
# NB: no glob here, there are generated targets in this list!
|
# 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[{}]"),
|
srcs = glob(TEMPLATE_SOURCE_LIST) + aten_ufunc_generated_all_cpu_sources(":gen_aten[{}]"),
|
||||||
visibility = [
|
visibility = [
|
||||||
"PUBLIC",
|
"PUBLIC",
|
||||||
@ -1044,7 +1040,6 @@ def define_buck_targets(
|
|||||||
srcs = [
|
srcs = [
|
||||||
"aten/src/ATen/native/native_functions.yaml",
|
"aten/src/ATen/native/native_functions.yaml",
|
||||||
"aten/src/ATen/native/tags.yaml",
|
"aten/src/ATen/native/tags.yaml",
|
||||||
# @lint-ignore BUCKRESTRICTEDSYNTAX
|
|
||||||
] + glob(["aten/src/ATen/templates/*"]),
|
] + glob(["aten/src/ATen/templates/*"]),
|
||||||
visibility = [
|
visibility = [
|
||||||
"PUBLIC",
|
"PUBLIC",
|
||||||
|
@ -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:fb_xplat_genrule.bzl", "fb_xplat_genrule")
|
||||||
load("//tools/build_defs:type_defs.bzl", "is_list", "is_string")
|
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
|
IS_OSS = read_config("pt", "is_oss", "0") == "1" # True for OSS BUCK build, and False for internal BUCK build
|
||||||
|
|
||||||
USED_PT_BACKENDS = [
|
USED_PT_BACKENDS = [
|
||||||
|
2
third_party/kineto.buck.bzl
vendored
2
third_party/kineto.buck.bzl
vendored
@ -94,7 +94,6 @@ def define_kineto():
|
|||||||
"kineto/libkineto/include",
|
"kineto/libkineto/include",
|
||||||
"kineto/libkineto/src",
|
"kineto/libkineto/src",
|
||||||
],
|
],
|
||||||
# @lint-ignore BUCKRESTRICTEDSYNTAX
|
|
||||||
raw_headers = glob([
|
raw_headers = glob([
|
||||||
"kineto/libkineto/include/*.h",
|
"kineto/libkineto/include/*.h",
|
||||||
"kineto/libkineto/src/*.h",
|
"kineto/libkineto/src/*.h",
|
||||||
@ -138,7 +137,6 @@ def define_kineto():
|
|||||||
"kineto/libkineto/include",
|
"kineto/libkineto/include",
|
||||||
"kineto/libkineto/src",
|
"kineto/libkineto/src",
|
||||||
],
|
],
|
||||||
# @lint-ignore BUCKRESTRICTEDSYNTAX
|
|
||||||
raw_headers = glob([
|
raw_headers = glob([
|
||||||
"kineto/libkineto/include/*.h",
|
"kineto/libkineto/include/*.h",
|
||||||
"kineto/libkineto/src/*.h",
|
"kineto/libkineto/src/*.h",
|
||||||
|
@ -26,7 +26,6 @@ def define_tools_targets(
|
|||||||
|
|
||||||
python_library(
|
python_library(
|
||||||
name = "jit",
|
name = "jit",
|
||||||
# @lint-ignore BUCKRESTRICTEDSYNTAX
|
|
||||||
srcs = glob([
|
srcs = glob([
|
||||||
"jit/*.py",
|
"jit/*.py",
|
||||||
"jit/templates/*",
|
"jit/templates/*",
|
||||||
@ -110,10 +109,7 @@ def define_tools_targets(
|
|||||||
|
|
||||||
python_library(
|
python_library(
|
||||||
name = "autograd",
|
name = "autograd",
|
||||||
# @lint-ignore BUCKRESTRICTEDSYNTAX
|
srcs = glob(["autograd/*.py"]),
|
||||||
srcs = glob(
|
|
||||||
["autograd/*.py"],
|
|
||||||
),
|
|
||||||
base_module = "tools",
|
base_module = "tools",
|
||||||
resources = [
|
resources = [
|
||||||
"autograd/deprecated.yaml",
|
"autograd/deprecated.yaml",
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
|
|
||||||
def is_production_build():
|
def is_production_build():
|
||||||
if read_config("pt", "is_oss", "0") == "0":
|
if read_config("pt", "is_oss", "0") == "0":
|
||||||
fail("This file is for open source pytorch build. Do not use it in fbsource!")
|
fail("This file is for open source pytorch build. Do not use it in fbsource!")
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
|
|
||||||
def is_production_build():
|
def is_production_build():
|
||||||
if read_config("pt", "is_oss", "0") == "0":
|
if read_config("pt", "is_oss", "0") == "0":
|
||||||
fail("This file is for open source pytorch build. Do not use it in fbsource!")
|
fail("This file is for open source pytorch build. Do not use it in fbsource!")
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# Only used for PyTorch open source BUCK build
|
# Only used for PyTorch open source BUCK build
|
||||||
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
|
|
||||||
|
|
||||||
def compose_platform_setting_list(settings):
|
def compose_platform_setting_list(settings):
|
||||||
"""Settings object:
|
"""Settings object:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Only used for PyTorch open source BUCK build
|
# Only used for PyTorch open source BUCK build
|
||||||
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
|
|
||||||
def _genrule(default_outs = ["."], **kwargs):
|
def _genrule(default_outs = ["."], **kwargs):
|
||||||
if read_config("pt", "is_oss", "0") == "0":
|
if read_config("pt", "is_oss", "0") == "0":
|
||||||
fail("This file is for open source pytorch build. Do not use it in fbsource!")
|
fail("This file is for open source pytorch build. Do not use it in fbsource!")
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
# Only used for PyTorch open source BUCK build
|
# Only used for PyTorch open source BUCK build
|
||||||
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
|
|
||||||
|
|
||||||
load(
|
load(":buck_helpers.bzl", "filter_attributes")
|
||||||
":buck_helpers.bzl",
|
|
||||||
"filter_attributes",
|
|
||||||
)
|
|
||||||
|
|
||||||
def fb_xplat_cxx_library(
|
def fb_xplat_cxx_library(
|
||||||
name,
|
name,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Only used for PyTorch open source BUCK build
|
# 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_test(
|
def fb_xplat_cxx_test(
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# Only used for PyTorch open source BUCK build
|
# Only used for PyTorch open source BUCK build
|
||||||
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
|
|
||||||
|
|
||||||
def fb_xplat_genrule(default_outs = ["."], apple_sdks = None, **kwargs):
|
def fb_xplat_genrule(default_outs = ["."], apple_sdks = None, **kwargs):
|
||||||
if read_config("pt", "is_oss", "0") == "0":
|
if read_config("pt", "is_oss", "0") == "0":
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# Only used for PyTorch open source BUCK build
|
# Only used for PyTorch open source BUCK build
|
||||||
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
|
|
||||||
|
|
||||||
def is_arvr_mode():
|
def is_arvr_mode():
|
||||||
if read_config("pt", "is_oss", "0") == "0":
|
if read_config("pt", "is_oss", "0") == "0":
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# Only used for PyTorch open source BUCK build
|
# Only used for PyTorch open source BUCK build
|
||||||
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
|
|
||||||
|
|
||||||
def select(conditions):
|
def select(conditions):
|
||||||
if read_config("pt", "is_oss", "0") == "0":
|
if read_config("pt", "is_oss", "0") == "0":
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# Only used for PyTorch open source BUCK build
|
# Only used for PyTorch open source BUCK build
|
||||||
# @lint-ignore-every BUCKRESTRICTEDSYNTAX
|
|
||||||
|
|
||||||
def windows_convert_gcc_clang_flags(flags = []):
|
def windows_convert_gcc_clang_flags(flags = []):
|
||||||
if read_config("pt", "is_oss", "0") == "0":
|
if read_config("pt", "is_oss", "0") == "0":
|
||||||
|
Reference in New Issue
Block a user