Updated ruff to the latest version (#31926)

* Updated ruff version and fixed the required code accorindg to the latest version.

* Updated ruff version and fixed the required code accorindg to the latest version.

* Added noqa directive to ignore 1 error shown by ruff
This commit is contained in:
Sai-Suraj-27
2024-07-23 20:37:31 +05:30
committed by GitHub
parent 9cf4f2aa9a
commit d2c687b3f1
14 changed files with 17 additions and 17 deletions

View File

@@ -418,7 +418,7 @@ class TestTheRest(TestCasePlus):
with CaptureStdout() as cs:
args = parser.parse_args(args)
assert False, "--help is expected to sys.exit"
assert excinfo.type == SystemExit
assert excinfo.type is SystemExit
expected = lightning_base.arg_to_scheduler_metavar
assert expected in cs.out, "--help is expected to list the supported schedulers"
@@ -429,7 +429,7 @@ class TestTheRest(TestCasePlus):
with CaptureStderr() as cs:
args = parser.parse_args(args)
assert False, "invalid argument is expected to sys.exit"
assert excinfo.type == SystemExit
assert excinfo.type is SystemExit
expected = f"invalid choice: '{unsupported_param}'"
assert expected in cs.err, f"should have bailed on invalid choice of scheduler {unsupported_param}"