[BE]: Enable Ruff + Flake8 G201,G202 logging format rule. (#114474)

Standardizes logging calls to always use logging.exception instead of logging.error where appropriate and enforces it with a lint.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/114474
Approved by: https://github.com/jansel, https://github.com/malfet
This commit is contained in:
Aaron Gokaslan
2023-11-27 17:38:08 +00:00
committed by PyTorch MergeBot
parent 3a4dea99df
commit 4bb3a02d02
8 changed files with 15 additions and 18 deletions

View File

@ -18,7 +18,7 @@ ignore =
# these ignores are from flake8-comprehensions; please fix!
C407,
# these ignores are from flake8-logging-format; please fix!
G100,G101,G200,G201,G202
G100,G101,G200
# these ignores are from flake8-simplify. please fix or ignore with commented reason
SIM105,SIM108,SIM110,SIM111,SIM113,SIM114,SIM115,SIM116,SIM117,SIM118,SIM119,SIM12,
# flake8-simplify code styles