Skip to content
Snippets Groups Projects
Commit fe958fa0 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

MAINT: add type hint

parent 79c13ab7
No related branches found
No related tags found
1 merge request!37ENH: add function that generates passwords
Pipeline #16981 passed
This commit is part of merge request !37. Comments created here will be created in the context of that merge request.
...@@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## ## [Unreleased] ##
### Added ### ### Added ###
- function in administration that generates passwords that comply with the - function in administration that generates passwords that comply with the
rules rules
### Changed ### ### Changed ###
......
...@@ -111,7 +111,7 @@ def get_server_property(key): ...@@ -111,7 +111,7 @@ def get_server_property(key):
return get_server_properties()[key] return get_server_properties()[key]
def get_password(length): def get_password(length: int):
""" creates a random password that fulfills the security requirements """ """ creates a random password that fulfills the security requirements """
sample_letters = string.ascii_letters + string.digits + "!#$%*+-/:;?_" sample_letters = string.ascii_letters + string.digits + "!#$%*+-/:;?_"
password = ''.join((random.choice(sample_letters) for i in range(length))) password = ''.join((random.choice(sample_letters) for i in range(length)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment