Skip to content

Commit

Permalink
Assured we correctly identify FQRN on mocking
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Mar 17, 2021
1 parent 94a233d commit ee28104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ansiblelint/_prerun.py
Expand Up @@ -274,7 +274,7 @@ def _update_env(varname: str, value: List[str], default: str = "") -> None:
def _perform_mockings() -> None:
"""Mock modules and roles."""
for role_name in options.mock_roles:
if re.match(r"\w+\.\w+\.\w+", role_name):
if re.match(r"\w+\.\w+\.\w+$", role_name):
namespace, collection, role_dir = role_name.split(".")
path = f".cache/collections/ansible_collections/{ namespace }/{ collection }/roles/{ role_dir }/"
else:
Expand Down

0 comments on commit ee28104

Please sign in to comment.