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

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

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2026-01-08 09:23:03 +13:00 committed by GitHub
parent defd15609c
commit c8356981bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 21 additions and 27 deletions

View file

@ -269,6 +269,7 @@ images:
name: SampleName
"""
import re
from ansible_collections.community.general.plugins.module_utils.opennebula import OpenNebulaModule
@ -345,8 +346,6 @@ class ImageInfoModule(OpenNebulaModule):
pool = self.get_all_images()
if name_pattern.startswith("~"):
import re
if name_pattern[1] == "*":
pattern = re.compile(name_pattern[2:], re.IGNORECASE)
else: