mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Enable readability-redundant-declaration (#143982)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/143982 Approved by: https://github.com/Skylion007
This commit is contained in:
parent
934eaa503f
commit
af629a8146
|
|
@ -60,7 +60,6 @@ readability-simplify-subscript-expr,
|
||||||
readability-string-compare,
|
readability-string-compare,
|
||||||
-readability-redundant-access-specifiers,
|
-readability-redundant-access-specifiers,
|
||||||
-readability-redundant-control-flow,
|
-readability-redundant-control-flow,
|
||||||
-readability-redundant-declaration,
|
|
||||||
'
|
'
|
||||||
HeaderFilterRegex: '^(aten/|c10/|torch/).*$'
|
HeaderFilterRegex: '^(aten/|c10/|torch/).*$'
|
||||||
WarningsAsErrors: '*'
|
WarningsAsErrors: '*'
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,6 @@
|
||||||
|
|
||||||
namespace c10 {
|
namespace c10 {
|
||||||
|
|
||||||
DispatchKey computeDispatchKey(
|
|
||||||
std::optional<ScalarType> dtype,
|
|
||||||
std::optional<Layout> layout,
|
|
||||||
std::optional<Device> device);
|
|
||||||
|
|
||||||
inline ScalarType dtype_or_default(std::optional<ScalarType> dtype) {
|
inline ScalarType dtype_or_default(std::optional<ScalarType> dtype) {
|
||||||
return dtype.value_or(get_default_dtype_as_scalartype());
|
return dtype.value_or(get_default_dtype_as_scalartype());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,8 +149,6 @@ static PyObject* THPSize_repr(THPSize* self) {
|
||||||
END_HANDLE_TH_ERRORS
|
END_HANDLE_TH_ERRORS
|
||||||
}
|
}
|
||||||
|
|
||||||
extern PyTypeObject THPSizeType;
|
|
||||||
|
|
||||||
template <typename FnType, FnType fn, typename... Args>
|
template <typename FnType, FnType fn, typename... Args>
|
||||||
static PyObject* wrap_tuple_fn(Args... args) {
|
static PyObject* wrap_tuple_fn(Args... args) {
|
||||||
THPObjectPtr result((*fn)(std::forward<Args>(args)...));
|
THPObjectPtr result((*fn)(std::forward<Args>(args)...));
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ static inline int PyCode_GetNFreevars(PyCodeObject* code) {
|
||||||
|
|
||||||
// Provided by CPython but getting the header for them is very hard
|
// Provided by CPython but getting the header for them is very hard
|
||||||
#if IS_PYTHON_3_11_PLUS
|
#if IS_PYTHON_3_11_PLUS
|
||||||
|
// NOLINTNEXTLINE(readability-redundant-declaration)
|
||||||
PyAPI_FUNC(void) _PyWeakref_ClearRef(PyWeakReference* self);
|
PyAPI_FUNC(void) _PyWeakref_ClearRef(PyWeakReference* self);
|
||||||
#else
|
#else
|
||||||
extern void _PyWeakref_ClearRef(PyWeakReference* self);
|
extern void _PyWeakref_ClearRef(PyWeakReference* self);
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,7 @@ TORCH_API at::ClassTypePtr getCustomClass(const std::string& name);
|
||||||
|
|
||||||
// Given an IValue, return true if the object contained in that IValue
|
// Given an IValue, return true if the object contained in that IValue
|
||||||
// is a custom C++ class, otherwise return false.
|
// is a custom C++ class, otherwise return false.
|
||||||
|
// NOLINTNEXTLINE(readability-redundant-declaration)
|
||||||
TORCH_API bool isCustomClass(const c10::IValue& v);
|
TORCH_API bool isCustomClass(const c10::IValue& v);
|
||||||
|
|
||||||
// This API is for testing purposes ONLY. It should not be used in
|
// This API is for testing purposes ONLY. It should not be used in
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user