Xuehai Pan
8a67daf283
[BE][Easy] enable postponed annotations in tools ( #129375 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129375
Approved by: https://github.com/malfet
2024-06-29 09:23:35 +00:00
PyTorch MergeBot
a32ce5ce34
Revert "[BE][Easy] enable postponed annotations in tools ( #129375 )"
...
This reverts commit 59eb2897f1 .
Reverted https://github.com/pytorch/pytorch/pull/129375 on behalf of https://github.com/huydhn due to Sorry for reverting your change but I need to revert to cleanly revert https://github.com/pytorch/pytorch/pull/129374 , please do a rebase and reland this ([comment](https://github.com/pytorch/pytorch/pull/129375#issuecomment-2197800541 ))
2024-06-29 00:44:25 +00:00
Xuehai Pan
59eb2897f1
[BE][Easy] enable postponed annotations in tools ( #129375 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129375
Approved by: https://github.com/malfet
2024-06-28 15:37:54 +00:00
Aaron Gokaslan
6d725e7d66
[BE]: enable ruff rules PLR1722 and PLW3301 ( #109461 )
...
Enables two ruff rules derived from pylint:
* PLR1722 replaces any exit() calls with sys.exit(). exit() is only designed to be used in repl contexts as may not always be imported by default. This always use the version in the sys module which is better
* PLW3301 replaces nested min / max calls with simplified versions (ie. `min(a, min(b, c))` => `min(a, b. c)`). The new version is more idiomatic and more efficient.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109461
Approved by: https://github.com/ezyang
2023-09-18 02:07:21 +00:00
Aaron Gokaslan
9171f7d4cd
[BE] Modernize PyTorch even more for 3.8 with pyupgrade ( #94520 )
...
Applies some more pyupgrade fixits to PyTorch
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94520
Approved by: https://github.com/ezyang
2023-02-10 18:02:50 +00:00
Huy Do
ef035d083e
Add ufmt to unify black and usort ( #81157 )
...
This reworks [80257](https://github.com/pytorch/pytorch/pull/80257 ) a bit to use ufmt:
* ufmt https://ufmt.omnilib.dev/en/stable/ unifies both black and usort to automatically format the file in the "most Pythonic" way
* Also make a demo run for all files in `tools/linter/**/*.py`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81157
Approved by: https://github.com/suo
2022-07-11 19:20:22 +00:00
Michael Suo
cbbb96c271
[lint] add shellcheck to lintrunner
...
As title
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75856
Approved by: https://github.com/malfet
2022-04-15 04:03:54 +00:00