pytorch/torch
Sam Estep 75024e228c Add lint for unqualified type: ignore (#56290)
Summary:
The other half of https://github.com/pytorch/pytorch/issues/56272.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/56290

Test Plan:
CI should pass on the tip of this PR, and we know that the lint works because the following CI runs (before this PR was finished) failed:

- https://github.com/pytorch/pytorch/runs/2384511062
- https://github.com/pytorch/pytorch/actions/runs/765036024

Reviewed By: seemethere

Differential Revision: D27867219

Pulled By: samestep

fbshipit-source-id: e648f07b6822867e70833e23ddafe7fb7eaca235
2021-04-21 08:07:23 -07:00
..
_C Fix distributed.test_jit_c10d flaky tests (#56410) 2021-04-20 09:28:27 -07:00
autograd Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
backends Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
contrib
csrc [NNC] added skeleton for refactoring (#55371) 2021-04-21 04:07:01 -07:00
cuda Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
distributed Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
distributions Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
fft Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
for_onnx Un-ignore F403 in .flake8 (#55838) 2021-04-13 09:24:07 -07:00
futures Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
fx Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
jit Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
legacy
lib s/AutoNonVariableTypeMode/AutoDispatchBelowAutograd/ (#56423) 2021-04-20 17:17:46 -07:00
linalg Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
multiprocessing Un-ignore F403 in .flake8 (#55838) 2021-04-13 09:24:07 -07:00
nn Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
onnx Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
optim [optim] take kw-only argument for functional optim APIs (#56185) 2021-04-15 20:08:04 -07:00
package Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
profiler Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
quantization Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
sparse
special Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
testing Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
utils Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
__config__.py
__future__.py
__init__.py Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
_appdirs.py
_autograd_functions.py
_classes.py
_deploy.py
_jit_internal.py Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
_linalg_utils.py
_lobpcg.py Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
_lowrank.py
_namedtensor_internals.py
_ops.py
_python_dispatcher.py
_six.py
_storage_docs.py
_tensor.py Add CSR (compressed sparse row) layout for sparse tensors (#50937) 2021-04-12 10:09:12 -07:00
_tensor_docs.py Add CSR (compressed sparse row) layout for sparse tensors (#50937) 2021-04-12 10:09:12 -07:00
_tensor_str.py Add CSR (compressed sparse row) layout for sparse tensors (#50937) 2021-04-12 10:09:12 -07:00
_torch_docs.py Fix TestTypeHints.test_doc_examples (#56388) 2021-04-19 15:27:09 -07:00
_utils.py
_utils_internal.py
_VF.py
_vmap_internals.py Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
abi-check.cpp
CMakeLists.txt Add minidump collection via breakpad (#55647) 2021-04-16 13:05:01 -07:00
custom_class.h
custom_class_detail.h
deploy.h
extension.h
functional.py Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
hub.py Add lint for unqualified type: ignore (#56290) 2021-04-21 08:07:23 -07:00
library.h
overrides.py Python API for Vitals (#53238) 2021-04-15 16:06:43 -07:00
py.typed
quasirandom.py Port NumPy typing testing style to PyTorch (#54234) 2021-04-15 01:25:16 -07:00
random.py Port NumPy typing testing style to PyTorch (#54234) 2021-04-15 01:25:16 -07:00
README.txt
script.h
serialization.py
storage.py
types.py

Note [TH abstraction violation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TH/THC provide some hpp headers, which are proper C++ headers rather than
C headers.  These headers serve double duty as *internal implementation
detail* headers, whose contents should largely not be used by external
clients.

Ideally, we would not install these headers at all; instead, you should
use public functions (in headers like `THTensor.h`, NOT `THTensor.hpp`)
to manipulate these structs.  However, there are a few places
in torch/csrc where we violate this abstraction.  They are marked with
a pointer to this note.  Each of those sites will have to be refactored
when we refactor the guts of THTensor and related structures.