-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed matching patterns used for mocking #1470
Conversation
if re.match(r"\w+\.\w+\.\w+", module_name): | ||
namespace, collection, module_file = module_name.split(".") | ||
path = f"{ options.project_dir }/.cache/collections/ansible_collections/{ namespace }/{ collection }/plugins/modules" | ||
if re.match(r"^(\w+|\w+\.\w+\.[\.\w]+)$", module_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if re.match(r"^(\w+|\w+\.\w+\.[\.\w]+)$", module_name): | |
if re.match(r"^(\w+|\w+\.\w+(\.\w+)+)$", module_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my tests done on https://regex101.com/ mine example worked as intended but the one with nested matches failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly did fail? I tried several variants, and they all worked.
No description provided.