Apply ruff flake8-comprehensions (#21694)

This commit is contained in:
Aaron Gokaslan
2023-02-22 03:14:54 -05:00
committed by GitHub
parent df06fb1f0b
commit 5e8c8eb5ba
230 changed files with 971 additions and 955 deletions

View File

@@ -56,9 +56,9 @@ class CheckDummiesTester(unittest.TestCase):
"pytorch_utils.py",
"models/bert/configuration_bert.py",
]
expected_deps = set(os.path.join(transformers_path, f) for f in expected_deps)
expected_deps = {os.path.join(transformers_path, f) for f in expected_deps}
repo = Repo(git_repo_path)
with checkout_commit(repo, GIT_TEST_SHA):
deps = get_module_dependencies(bert_module)
deps = set(os.path.expanduser(f) for f in deps)
deps = {os.path.expanduser(f) for f in deps}
self.assertEqual(deps, expected_deps)