Skip to content

Commit

Permalink
ci: Ignore cryptography>43.0.0 warnings (#765)
Browse files Browse the repository at this point in the history
* ci: Ignore cryptography>43.0.0 warnings
* bump: Bump ruff to 0.5.4
* ci: Fix ruff new issues
* ci: Fix mypy new issues
  • Loading branch information
gmuloc committed Jul 25, 2024
1 parent 7c61fe6 commit 1ef92f6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
- '<!--| ~| -->'

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2
rev: v0.5.4
hooks:
- id: ruff
name: Run Ruff linter
Expand Down
2 changes: 1 addition & 1 deletion anta/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AntaTemplate:

# pylint: disable=too-few-public-methods

def __init__( # noqa: PLR0913
def __init__(
self,
template: str,
version: Literal[1, "latest"] = "latest",
Expand Down
2 changes: 1 addition & 1 deletion anta/tests/routing/bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _add_bgp_routes_failure(
# Iterate over the expected BGP routes
for route in bgp_routes:
str_route = str(route)
failure = {"bgp_peers": {peer: {vrf: {route_type: {str_route: Any}}}}}
failure: dict[str, Any] = {"bgp_peers": {peer: {vrf: {route_type: {}}}}}

# Check if the route is missing in the BGP output
if str_route not in bgp_output:
Expand Down
2 changes: 1 addition & 1 deletion asynceapi/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Device(httpx.AsyncClient):
EAPI_OFMT_OPTIONS = ("json", "text")
EAPI_DEFAULT_OFMT = "json"

def __init__( # noqa: PLR0913 # pylint: disable=too-many-arguments
def __init__( # pylint: disable=too-many-arguments
self,
host: str | None = None,
username: str | None = None,
Expand Down
2 changes: 1 addition & 1 deletion asynceapi/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class EapiCommandError(RuntimeError):
not_exec: a list of commands that were not executed
"""

def __init__(self, failed: str, errors: list[str], errmsg: str, passed: list[str | dict[str, Any]], not_exec: list[dict[str, Any]]) -> None: # noqa: PLR0913 # pylint: disable=too-many-arguments
def __init__(self, failed: str, errors: list[str], errmsg: str, passed: list[str | dict[str, Any]], not_exec: list[dict[str, Any]]) -> None: # pylint: disable=too-many-arguments
"""Initialize for the EapiCommandError exception."""
self.failed = failed
self.errmsg = errmsg
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dev = [
"pytest-html>=3.2.0",
"pytest-metadata>=3.0.0",
"pytest>=7.4.0",
"ruff>=0.5.0,<0.6.0",
"ruff>=0.5.4,<0.6.0",
"tox>=4.10.0,<5.0.0",
"types-PyYAML",
"types-pyOpenSSL",
Expand Down Expand Up @@ -172,6 +172,9 @@ filterwarnings = [
"default:pkg_resources is deprecated:DeprecationWarning",
# Need to investigate the following - only occuring when running the full pytest suite
"ignore:Exception ignored in.*:pytest.PytestUnraisableExceptionWarning",
# Ignore cryptography >=43.0.0 warnings until asyncssh issue is fixed
"ignore:ARC4:cryptography.utils.CryptographyDeprecationWarning",
"ignore:TripleDES:cryptography.utils.CryptographyDeprecationWarning",

]

Expand Down

0 comments on commit 1ef92f6

Please sign in to comment.