Skip to content

Commit

Permalink
Refactor: Add annotations to lftools.helpers
Browse files Browse the repository at this point in the history
Issue: RELENG-4933
Signed-off-by: Andrew Grimberg <[email protected]>
Change-Id: I28a94f82c6fdb04380cb2bc731ebc13811157ceb
  • Loading branch information
tykeal committed Oct 10, 2023
1 parent f69da9a commit bcb4bb7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lftools/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
##############################################################################

"""Nexus3 REST API interface."""
from __future__ import annotations

import random
import string


def generate_password(length=12):
punctuation = "!#$%&()*+,-.:;<=>?@[]^_{|}~"
password_characters = string.ascii_letters + string.digits + punctuation
def generate_password(length: int = 12) -> str:
punctuation: str = "!#$%&()*+,-.:;<=>?@[]^_{|}~"
password_characters: str = string.ascii_letters + string.digits + punctuation
return "".join(random.choice(password_characters) for _ in range(length))

0 comments on commit bcb4bb7

Please sign in to comment.