diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8590286..9596a4e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,28 +17,37 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: pdm-project/setup-pdm@v4 + - uses: astral-sh/setup-uv@v2 + with: + enable-cache: True + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - - run: pdm install --dev --no-self --no-default - - run: pdm run tox -e py3-salt${{ matrix.salt }} -- -vv + - run: uv sync --all-extras --dev + - run: uv run tox -e py3-salt${{ matrix.salt }} -- -vv ruff-check: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: pdm-project/setup-pdm@v4 + - uses: astral-sh/setup-uv@v2 + with: + enable-cache: True + - uses: actions/setup-python@v5 with: python-version: "3.12" - - run: pdm install --dev --no-self --no-default - - run: pdm run ruff check --no-fix --diff + - run: uv sync --dev + - run: uv run ruff check --no-fix --diff ruff-format: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: pdm-project/setup-pdm@v4 + - uses: astral-sh/setup-uv@v2 + with: + enable-cache: True + - uses: actions/setup-python@v5 with: python-version: "3.12" - - run: pdm install --dev --no-self --no-default - - run: pdm run ruff format --diff --check + - run: uv sync --dev + - run: uv run ruff format --diff --check diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..c8cfe39 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.10 diff --git a/pyproject.toml b/pyproject.toml index ebeaa5c..115577f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ pillar_dirs = "salt_tower.loader:pillar_dirs" render_dirs = "salt_tower.loader:renderers_dirs" [project.optional-dependencies] -test = ["pylint==3.2.7", "pytest==8.3.3"] +test = ["pylint==3.3.0", "pytest==8.3.3"] docs = [ "mike==2.1.3", "mkdocs-awesome-pages-plugin==2.9.3", @@ -37,19 +37,6 @@ docs = [ requires = ["pdm-pep517>=1.0"] build-backend = "pdm.pep517.api" -[tool.pdm.dev-dependencies] -dev = [ - "mypy==1.11.2", - "pylint==3.2.7", - "pyright>=1.1.356", - "pytest==8.3.3", - "ruff==0.6.7", - "tox==4.20.0", -] - -[tool.pdm.resolution.overrides] -pyzmq = "~=25.1" # 25.0.2 does not compile on 24.04 anymore - [tool.pyright] include = ["salt_tower", "test"] exclude = ["test/fixtures"] @@ -65,3 +52,13 @@ docstring-code-format = true [tool.ruff.lint] extend-select = ["I"] + +[tool.uv] +dev-dependencies = [ + "mypy==1.11.2", + "pylint==3.3.0", + "pyright>=1.1.356", + "pytest==8.3.3", + "ruff==0.6.5", + "tox==4.18.1", +] diff --git a/salt_tower/pillar/tower.py b/salt_tower/pillar/tower.py index 23caeaf..f7e71d4 100644 --- a/salt_tower/pillar/tower.py +++ b/salt_tower/pillar/tower.py @@ -290,7 +290,7 @@ def _load_file(self, file, base=None): self.update(data, merge=True) - def _compile( # pylint: disable=too-many-arguments + def _compile( # pylint: disable=too-many-arguments,too-many-positional-arguments self, template, default=None,