Upgrade flake8-bugbear to master, fix the new lints. (#18507)
authorEdward Yang <ezyang@fb.com>
Wed, 27 Mar 2019 15:01:15 +0000 (08:01 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 27 Mar 2019 15:07:41 +0000 (08:07 -0700)
commit81e030d9a6e8d1d5c3d83628f37f2d49bbed597d
treea4a71037453312f8147fd3bf894cf90c0fe38c42
parent85d78a0532225fa195ad4d15285b685ee44bd63b
Upgrade flake8-bugbear to master, fix the new lints. (#18507)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18507
ghimport-source-id: 1c3642befad2da78a7e5f39d6d58732b85c76267

Stack from [ghstack](https://github.com/ezyang/ghstack):
* **#18507 Upgrade flake8-bugbear to master, fix the new lints.**

It turns out Facebobok is internally using the unreleased master
flake8-bugbear, so upgrading it grabs a few more lints that Phabricator
was complaining about but we didn't get in open source.

A few of the getattr sites that I fixed look very suspicious (they're
written as if Python were a lazy language), but I didn't look more
closely into the matter.

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

fbshipit-source-id: fc3f97c87dca40bbda943a1d1061953490dbacf8
.flake8
.travis.yml
docs/cpp/source/conf.py
docs/source/conf.py
test/test_torch.py
torch/_jit_internal.py
torch/_six.py
torch/autograd/function.py