[BE][Ez]: Use interned hardcoded string FURB156 (#138330)

Uses string constants from string module.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/138330
Approved by: https://github.com/albanD
This commit is contained in:
Aaron Gokaslan
2024-10-18 18:26:14 +00:00
committed by PyTorch MergeBot
parent 9c2a80322a
commit 195d0a666b
4 changed files with 9 additions and 6 deletions

View File

@ -30,6 +30,7 @@ from torch.testing._internal.common_dtype import all_types_and_complex_and, floa
from torch.testing._internal.common_modules import modules, module_db, ModuleInfo
from torch.testing._internal.opinfo.core import SampleInput, DecorateInfo, OpInfo
import operator
import string
# For testing TestCase methods and torch.testing functions
class TestTesting(TestCase):
@ -2299,7 +2300,7 @@ class TestImports(TestCase):
# Calling logging.basicConfig, among other things, modifies the global
# logging state. It is not OK to modify the global logging state on
# `import torch` (or other submodules we own) because users do not expect it.
expected = 'abcdefghijklmnopqrstuvwxyz'
expected = string.ascii_lowercase
commands = [
'import logging',
f'import {path}',