Fix B903 lint: save memory for data classes with slots/namedtuple (#18184)
authorEdward Yang <ezyang@fb.com>
Thu, 21 Mar 2019 16:06:30 +0000 (09:06 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 21 Mar 2019 16:10:30 +0000 (09:10 -0700)
commitd1497debf2aeb27235afb3d73a970388ac8100ab
tree32bcd7887a3d3304f6b25a8a35edcb2b5fc0951b
parentba81074c4088f9b9445ca4d3f2a9463afab4845c
Fix B903 lint: save memory for data classes with slots/namedtuple (#18184)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18184
ghimport-source-id: 2ce860b07c58d06dc10cd7e5b97d4ef7c709a50d

Stack from [ghstack](https://github.com/ezyang/ghstack):
* **#18184 Fix B903 lint: save memory for data classes with slots/namedtuple**
* #18181 Fix B902 lint error: invalid first argument.
* #18178 Fix B006 lint errors: using mutable structure in default argument.
* #18177 Fix lstrip bug revealed by B005 lint

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Differential Revision: D14530872

fbshipit-source-id: e26cecab3a8545e7638454c28e654e7b82a3c08a
.flake8
aten/src/ATen/function_wrapper.py
test/common_methods_invocations.py
test/test_jit.py
torch/autograd/profiler.py
torch/jit/__init__.py