Commit Graph

5 Commits

Author SHA1 Message Date
なるみ
d83389d327 Ignore F401 in all __init__.py without putting noqa (#25823)
Summary:
By adding `per-file-ignores = __init__.py: F401` into `.flake8` with `flake8>=3.7`, we can ignore F410 in all `__init__.py` without putting `# noqa: F401` line by line.

http://flake8.pycqa.org/en/latest/user/options.html?highlight=per-file-ignores#cmdoption-flake8-per-file-ignores
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25823

Differential Revision: D17252182

Pulled By: soumith

fbshipit-source-id: 87b174075b79e4078953a7521bd1a8f82405646b
2019-10-23 15:28:13 -07:00
Gregory Chanan
30f31c66ba Kill declared_type and ignore_check from THFormal. (#26284)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26284

They aren't used anymore.

Test Plan: Imported from OSS

Differential Revision: D17397182

Pulled By: gchanan

fbshipit-source-id: 3f1cc0fd12aa8f8589548640421b206fa7c571e1
2019-09-17 07:40:33 -07:00
Gregory Chanan
9f1a817742 Kill unused enumerate_options_due_to_default.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/25588

Test Plan: Imported from OSS

Differential Revision: D17172502

Pulled By: gchanan

fbshipit-source-id: b3156a52ed5b4b108a1668714fe5cb26a3d3f575
2019-09-04 10:47:53 -07:00
Edward Yang
173f224570 Turn on F401: Unused import warning. (#18598)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18598
ghimport-source-id: c74597e5e7437e94a43c163cee0639b20d0d0c6a

Stack from [ghstack](https://github.com/ezyang/ghstack):
* **#18598 Turn on F401: Unused import warning.**

This was requested by someone at Facebook; this lint is turned
on for Facebook by default.  "Sure, why not."

I had to noqa a number of imports in __init__.  Hypothetically
we're supposed to use __all__ in this case, but I was too lazy
to fix it.  Left for future work.

Be careful!  flake8-2 and flake8-3 behave differently with
respect to import resolution for # type: comments.  flake8-3 will
report an import unused; flake8-2 will not.  For now, I just
noqa'd all these sites.

All the changes were done by hand.

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

Differential Revision: D14687478

fbshipit-source-id: 30d532381e914091aadfa0d2a5a89404819663e3
2019-03-30 09:01:17 -07:00
Trevor Killeen
cb4eaa9c5d TensorLib/Aten --> changes required in pytorch 2017-06-22 12:55:55 -04:00