Skip to content

Commit

Permalink
Update test dependencies (#3652)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Aug 16, 2023
1 parent 0c5907e commit 75509b8
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 63 deletions.
30 changes: 15 additions & 15 deletions .config/requirements-lock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,43 @@
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --no-annotate --output-file=.config/requirements-lock.txt --resolver=backtracking --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml
# pip-compile --no-annotate --output-file=.config/requirements-lock.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml
#
ansible-compat==4.1.6
ansible-core==2.15.1
ansible-core==2.15.3
attrs==23.1.0
black==23.7.0
bracex==2.3.post1
certifi==2023.5.7
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.2.0
click==8.1.5
cryptography==41.0.2
click==8.1.6
cryptography==41.0.3
filelock==3.12.2
idna==3.4
importlib-resources==5.0.7
jinja2==3.1.2
jsonschema==4.18.3
jsonschema-specifications==2023.6.1
jsonschema==4.19.0
jsonschema-specifications==2023.7.1
markdown-it-py==3.0.0
markupsafe==2.1.3
mdurl==0.1.2
mypy-extensions==1.0.0
packaging==23.1
pathspec==0.11.1
platformdirs==3.9.1
pathspec==0.11.2
platformdirs==3.10.0
pycparser==2.21
pygments==2.15.1
pyyaml==6.0
referencing==0.29.1
pygments==2.16.1
pyyaml==6.0.1
referencing==0.30.2
requests==2.31.0
rich==13.4.2
rpds-py==0.8.10
rich==13.5.2
rpds-py==0.9.2
ruamel-yaml==0.17.32
subprocess-tee==0.4.1
tomli==2.0.1
typing-extensions==4.7.1
urllib3==2.0.3
urllib3==2.0.4
wcmatch==8.4.1
yamllint==1.32.0

Expand Down
38 changes: 19 additions & 19 deletions .config/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# pip-compile --extra=docs --extra=test --no-annotate --output-file=.config/requirements.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml
#
ansible-compat==4.1.6
ansible-core==2.15.1
ansible-core==2.15.3
astroid==2.15.6
attrs==23.1.0
beautifulsoup4==4.12.2
Expand All @@ -18,14 +18,14 @@ cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.3
colorama==0.4.6
coverage==7.2.7
coverage==7.3.0
coverage-enable-subprocess==1.0
cryptography==41.0.2
cryptography==41.0.3
csscompressor==0.9.5
cssselect2==0.7.0
defusedxml==0.7.1
dill==0.3.6
exceptiongroup==1.1.2
dill==0.3.7
exceptiongroup==1.1.3
execnet==2.0.2
filelock==3.12.2
ghp-import==2.1.0
Expand All @@ -40,8 +40,8 @@ isort==5.12.0
jinja2==3.1.2
jmespath==1.0.1
jsmin==3.0.1
jsonschema==4.18.3
jsonschema-specifications==2023.6.1
jsonschema==4.19.0
jsonschema-specifications==2023.7.1
lazy-object-proxy==1.9.0
markdown==3.3.7
markdown-exec==1.6.0
Expand All @@ -62,22 +62,22 @@ mkdocs-minify-plugin==0.6.4
mkdocs-monorepo-plugin==1.0.5
mkdocstrings==0.22.0
mkdocstrings-python==1.1.0
mypy==1.4.1
mypy==1.5.0
mypy-extensions==1.0.0
netaddr==0.8.0
packaging==23.1
pathspec==0.11.1
pathspec==0.11.2
pillow==9.5.0
pipdeptree==2.7.1
platformdirs==3.9.1
platformdirs==3.10.0
pluggy==1.2.0
ply==3.11
psutil==5.9.5
pycparser==2.21
pygments==2.15.1
pylint==2.17.4
pylint==2.17.5
pymdown-extensions==10.0.1
pyparsing==3.1.0
pyparsing==3.1.1
pytest==7.4.0
pytest-mock==3.11.1
pytest-plus==0.4.0
Expand All @@ -86,12 +86,12 @@ python-dateutil==2.8.2
python-slugify==8.0.1
pyyaml==6.0
pyyaml-env-tag==0.1
rdflib==6.3.2
referencing==0.29.1
rdflib==7.0.0
referencing==0.30.2
regex==2023.5.5
requests==2.31.0
rich==13.4.2
rpds-py==0.8.10
rich==13.5.2
rpds-py==0.9.2
ruamel-yaml==0.17.32
six==1.16.0
soupsieve==2.4.1
Expand All @@ -100,9 +100,9 @@ subprocess-tee==0.4.1
text-unidecode==1.3
tinycss2==1.2.1
tomli==2.0.1
tomlkit==0.11.8
types-jsonschema==4.17.0.9
types-pyyaml==6.0.12.10
tomlkit==0.12.1
types-jsonschema==4.17.0.10
types-pyyaml==6.0.12.11
typing-extensions==4.6.2
uritools==4.0.1
urllib3==2.0.2
Expand Down
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ updates:
- dependabot-deps-updates
- skip-changelog
versioning-strategy: lockfile-only
ignore:
- dependency-name: mypy
- dependency-name: pipdeptree
- dependency-name: pylint
- dependency-name: types-jsonschema
- dependency-name: types-pyyaml
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
- id: check-useless-excludes
- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before yamllint
rev: v3.0.1
rev: v3.0.2
hooks:
- id: prettier
# Temporary excludes so we can gradually normalize the formatting
Expand Down Expand Up @@ -63,14 +63,14 @@ repos:
- prettier-plugin-toml
- prettier-plugin-sort-json
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v6.31.1
rev: v7.0.0
hooks:
- id: cspell
# entry: codespell --relative
args: [--relative, --no-progress, --no-summary]
name: Spell check with cspell
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.3
rev: 0.24.1
hooks:
- id: check-github-workflows
- repo: https://github.com/pre-commit/pre-commit-hooks.git
Expand Down Expand Up @@ -130,7 +130,7 @@ repos:
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.282"
rev: "v0.0.284"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -140,7 +140,7 @@ repos:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.5.0
hooks:
- id: mypy
# empty args needed in order to match mypy cli behavior
Expand Down Expand Up @@ -169,7 +169,7 @@ repos:
plugins/.*
)$
- repo: https://github.com/pycqa/pylint
rev: v3.0.0a6
rev: v3.0.0a7
hooks:
- id: pylint
args:
Expand All @@ -192,7 +192,7 @@ repos:
- wcmatch
- yamllint
- repo: https://github.com/jazzband/pip-tools
rev: 7.2.0
rev: 7.3.0
hooks:
- id: pip-compile
name: lock
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ python_files = [
xfail_strict = true

[tool.ruff]
required-version = "0.0.282"
required-version = "0.0.284"
ignore = [
"E501", # we use black
"ERA001", # auto-removal of commented out code affects development and vscode integration
Expand Down
13 changes: 10 additions & 3 deletions src/ansiblelint/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import logging
import os
from collections import defaultdict, namedtuple
from collections import defaultdict
from functools import partial
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, NamedTuple

import yaml
from yaml import YAMLError
Expand All @@ -19,7 +19,14 @@
if TYPE_CHECKING:
from pathlib import Path

IgnoreFile = namedtuple("IgnoreFile", "default alternative")

class IgnoreFile(NamedTuple):
"""IgnoreFile n."""

default: str
alternative: str


IGNORE_FILE = IgnoreFile(".ansible-lint-ignore", ".config/ansible-lint-ignore.txt")

yaml_load = partial(yaml.load, Loader=FullLoader)
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def all_subclasses(cls: type) -> set[type]:
class RulesCollection:
"""Container for a collection of rules."""

def __init__(
def __init__( # pylint: disable=too-many-arguments
self,
rulesdirs: list[str] | list[Path] | None = None,
options: Options | None = None,
Expand Down
12 changes: 9 additions & 3 deletions src/ansiblelint/rules/jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import logging
import re
import sys
from collections import namedtuple
from pathlib import Path
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, NamedTuple

import black
import jinja2
Expand All @@ -30,7 +29,14 @@
_logger = logging.getLogger(__package__)
KEYWORDS_WITH_IMPLICIT_TEMPLATE = ("changed_when", "failed_when", "until", "when")

Token = namedtuple("Token", "lineno token_type value")

class Token(NamedTuple):
"""Token."""

lineno: int
token_type: str
value: str


ignored_re = re.compile(
"|".join( # noqa: FLY002
Expand Down
14 changes: 7 additions & 7 deletions test/schemas/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/schemas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/js-yaml": "^4.0.5",
"@types/minimatch": "^5.1.2",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.2",
"@types/node": "^20.5.0",
"chai": "^4.3.7",
"minimatch": "^9.0.3",
"mocha": "^10.2.0",
Expand Down
9 changes: 3 additions & 6 deletions test/test_matcherrror.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,9 @@ def test_matcherror_compare_no_other_fallback(
"""Check that MatchError comparison with other types causes TypeError."""
expected_error = (
r"^("
r"unsupported operand type\(s\) for {operator!s}:|"
r"'{operator!s}' not supported between instances of"
r") 'MatchError' and '{other_type!s}'$".format(
other_type=type(other).__name__,
operator=operator_char,
)
rf"unsupported operand type\(s\) for {operator_char!s}:|"
rf"'{operator_char!s}' not supported between instances of"
rf") 'MatchError' and '{type(other).__name__!s}'$"
)
with pytest.raises(TypeError, match=expected_error):
operation(MatchError("foo"), other)
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ deps =
setenv =
# without his upgrade would likely not do anything
PIP_CONSTRAINT = /dev/null
commands_pre =
commands =
-pre-commit run --all-files --show-diff-on-failure --hook-stage manual lock
-pre-commit run --all-files --show-diff-on-failure --hook-stage manual up
Expand Down

0 comments on commit 75509b8

Please sign in to comment.