From fe958fa09c25d044a484dde56b0cc36388ff5e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Sat, 4 Dec 2021 13:16:09 +0100 Subject: [PATCH] MAINT: add type hint --- CHANGELOG.md | 2 +- src/caosdb/common/administration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cf15250..7bb0cc59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## ### Added ### -- function in administration that generates passwords that comply with the +- function in administration that generates passwords that comply with the rules ### Changed ### diff --git a/src/caosdb/common/administration.py b/src/caosdb/common/administration.py index 450f8de1..f47403a6 100644 --- a/src/caosdb/common/administration.py +++ b/src/caosdb/common/administration.py @@ -111,7 +111,7 @@ def get_server_property(key): return get_server_properties()[key] -def get_password(length): +def get_password(length: int): """ creates a random password that fulfills the security requirements """ sample_letters = string.ascii_letters + string.digits + "!#$%*+-/:;?_" password = ''.join((random.choice(sample_letters) for i in range(length))) -- GitLab