Skip to content

Commit

Permalink
Use '_unused' for an unused variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 22, 2024
1 parent 723fc41 commit 8017052
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions keyring/testing/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,4 @@ def Environ(**changes):

def random_string(k, source=ALPHABET):
"""Generate a random string with length <i>k</i>"""
result = ''
for i in range(0, k):
result += random.choice(source)
return result
return ''.join(random.choice(source) for _unused in range(k))

0 comments on commit 8017052

Please sign in to comment.