Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…0.4.2
  • Loading branch information
salt-extensions-renovatebot[bot] committed Sep 25, 2024
1 parent c991e0a commit 3835eb8
Show file tree
Hide file tree
Showing 11 changed files with 235 additions and 235 deletions.
3 changes: 2 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Autogenerated. Do not edit this by hand, use `copier update`.
---
_commit: 0.3.7
_commit: 0.4.2
_src_path: https://github.com/lkubb/salt-extension-copier
author: EITR Technologies, LLC
author_email: devops@eitr.tech
Expand All @@ -24,6 +24,7 @@ no_saltext_namespace: false
package_name: redis
project_name: redis
python_requires: '3.8'
relax_pylint: false
salt_version: '3005'
source_url: https://github.com/salt-extensions/saltext-redis
ssh_fixtures: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Pull Request or Push

on:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Tagged Releases

on:
Expand All @@ -16,7 +17,7 @@ jobs:

- name: Extract tag name
id: get_version
run: echo "version=$(echo ${GITHUB_REF#refs/tags/v})" >> $GITHUB_OUTPUT
run: echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"

call_central_workflow:
needs: get_tag_version
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ celerybeat.pid
*.sage.py

# Environments
!.envrc
.env
.venv
env/
Expand Down
58 changes: 32 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace # Trims trailing whitespace.
- id: check-merge-conflict # Check for files that contain merge conflict strings.
args: [--assume-in-merge]
- id: trailing-whitespace # Trim trailing whitespace.
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending # Replaces or checks mixed line ending.
- id: mixed-line-ending # Ensure files use UNIX-style newlines only.
args: [--fix=lf]
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: check-ast # Simply check whether files parse as valid python.
- id: end-of-file-fixer # Ensure files end with a newline.
- id: check-ast # Check whether files parse as valid Python.

# ----- Formatting ---------------------------------------------------------------------------->
- repo: https://github.com/saltstack/pre-commit-remove-import-headers
Expand All @@ -24,15 +24,15 @@ repos:
- id: check-cli-examples
name: Check CLI examples on execution modules
entry: python .pre-commit-hooks/check-cli-examples.py
language: system
language: python
files: ^src/saltext/redis/modules/.*\.py$

- repo: local
hooks:
- id: check-docs
name: Check rST doc files exist for modules/states
entry: python .pre-commit-hooks/make-autodocs.py
language: system
language: python
pass_filenames: false

- repo: https://github.com/s0undt3ch/salt-rewrite
Expand All @@ -56,7 +56,7 @@ repos:
args: [--silent, -E, fix_docstrings]

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
rev: v3.16.0
hooks:
- id: pyupgrade
name: Rewrite Code to be Py3.8+
Expand All @@ -75,14 +75,14 @@ repos:
exclude: src/saltext/redis/(__init__|version).py

- repo: https://github.com/psf/black
rev: 24.2.0
rev: 24.8.0
hooks:
- id: black
args: [-l 100]
exclude: src/saltext/redis/version.py

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
rev: 1.18.0
hooks:
- id: blacken-docs
args: [--skip-errors]
Expand All @@ -93,15 +93,15 @@ repos:

# ----- Security ------------------------------------------------------------------------------>
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
rev: 1.7.9
hooks:
- id: bandit
alias: bandit-salt
name: Run bandit against the code base
args: [--silent, -lll, --skip, B701]
exclude: src/saltext/redis/version.py
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
rev: 1.7.9
hooks:
- id: bandit
alias: bandit-tests
Expand All @@ -111,29 +111,35 @@ repos:
# <---- Security -------------------------------------------------------------------------------

# ----- Code Analysis ------------------------------------------------------------------------->
- repo: https://github.com/saltstack/mirrors-nox
rev: v2022.11.21

- repo: local
hooks:
- id: nox
alias: lint-src
name: Lint Source Code
language: python
entry: nox -e lint-code-pre-commit --
files: ^((setup|noxfile)|src/.*)\.py$
require_serial: true
args:
- -e
- lint-code-pre-commit
- --
additional_dependencies:
- nox==2024.4.15
- uv==0.4.0 # Makes this hook much faster

- repo: https://github.com/saltstack/mirrors-nox
rev: v2022.11.21
hooks:
- id: nox
alias: lint-tests
name: Lint Tests
language: python
entry: nox -e lint-tests-pre-commit --
files: ^tests/.*\.py$
require_serial: true
args:
- -e
- lint-tests-pre-commit
- --
additional_dependencies:
- nox==2024.4.15
- uv==0.4.0 # Makes this hook much faster

- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: 1ca29a1b5d949b3586800190ad6cc98317cb43b8 # v1.7.1.15
hooks:
- id: actionlint
additional_dependencies:
- shellcheck-py>=0.9.0.5
# <---- Code Analysis --------------------------------------------------------------------------
7 changes: 6 additions & 1 deletion .pre-commit-hooks/make-autodocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ def write_module(rst_path, path, use_virtualname=True):
virtualname = "``" + _find_virtualname(path) + "``"
else:
virtualname = make_import_path(path)
header_len = len(virtualname)
# The check-merge-conflict pre-commit hook chokes here:
# https://github.com/pre-commit/pre-commit-hooks/issues/100
if header_len == 7:
header_len += 1
module_contents = f"""\
{virtualname}
{'='*len(virtualname)}
{'='*header_len}
.. automodule:: {make_import_path(path)}
:members:
Expand Down
Loading

0 comments on commit 3835eb8

Please sign in to comment.