Skip to content

Commit

Permalink
Further cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lkubb committed Nov 14, 2023
1 parent 697d258 commit 0ce23a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/saltext/cli/project/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ nox.options.reuse_existing_virtualenvs = True
nox.options.error_on_missing_interpreters = False

# Python versions to test against
PYTHON_VERSIONS = ("3" {%- for i in range(python_requires[1], max_python_minor + 1) %}, "3.{{i}}"{%- endfor %})
PYTHON_VERSIONS = ("3" {%- for i in range(python_requires[1], max_python_minor + 1) %}, "3.{{ i }}"{%- endfor %})
# Be verbose when running under a CI context
CI_RUN = (
os.environ.get("JENKINS_URL") or os.environ.get("CI") or os.environ.get("DRONE") is not None
Expand Down
8 changes: 4 additions & 4 deletions src/saltext/cli/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def __virtual__():
# return (False, "The {{ project_name }} {{ loader_name }} module is not implemented yet")
# Replace this with your own logic
if "{{package_name}}.example_function" not in __salt__:
return False, "The '{{package_name}}' execution module is not available"
if "{{ package_name }}.example_function" not in __salt__:
return False, "The '{{ package_name }}' execution module is not available"
return __virtualname__
Expand All @@ -106,10 +106,10 @@ def exampled(name):
This example function should be replaced
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
value = __salt__["{{package_name}}.example_function"](name)
value = __salt__["{{ package_name }}.example_function"](name)
if value == name:
ret["result"] = True
ret["comment"] = f"The '{{package_name}}.example_function' returned: '{value}'"
ret["comment"] = f"The '{{ package_name }}.example_function' returned: '{value}'"
return ret
'''

Expand Down

0 comments on commit 0ce23a1

Please sign in to comment.