1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-25 13:12:46 +00:00

[PR #11396/c8356981 backport][stable-12] move imports from functions to the top of the file (#11399)

move imports from functions to the top of the file (#11396)

* move imports from functions to the top of the file

* add changelog frag

* Apply suggestions from code review



---------


(cherry picked from commit c8356981bb)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2026-01-07 21:27:49 +01:00 committed by GitHub
parent 6169699b24
commit e3535de323
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 21 additions and 27 deletions

View file

@ -272,6 +272,8 @@ EXAMPLES = r"""
delegate_to: localhost
"""
import random
import string
import time
import traceback
@ -295,8 +297,6 @@ def randompass():
# It must contain at least two of these four character classes:
# lower case letters - upper case letters - numbers - punctuation
# we play it safe :)
import random
import string
# as of python 2.4, this reseeds the PRNG from urandom
random.seed()