Skip to content

Commit 73fb502

Browse files
authored
Merge pull request #222 from opsmill/stable
Merge stable into develop to upgrade ruff
2 parents c3315c7 + d617bdd commit 73fb502

File tree

4 files changed

+30
-26
lines changed

4 files changed

+30
-26
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
- name: "Check out repository code"
7676
uses: "actions/checkout@v4"
7777
- name: "Setup environment"
78-
run: "pip install ruff==0.7.1"
78+
run: "pip install ruff==0.8.6"
7979
- name: "Linting: ruff check"
8080
run: "ruff check ."
8181
- name: "Linting: ruff format"

infrahub_sdk/data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from pydantic import BaseModel, ConfigDict, Field
44

5-
from .node import InfrahubNode # noqa: TCH001
5+
from .node import InfrahubNode # noqa: TC001
66

77

88
class RepositoryBranchInfo(BaseModel):
@@ -13,7 +13,8 @@ class RepositoryData(BaseModel):
1313
model_config = ConfigDict(arbitrary_types_allowed=True)
1414
repository: InfrahubNode = Field(..., description="InfrahubNode representing a Repository")
1515
branches: dict[str, str] = Field(
16-
..., description="Dictionary with the name of the branch as the key and the active commit id as the value"
16+
...,
17+
description="Dictionary with the name of the branch as the key and the active commit id as the value",
1718
)
1819

1920
branch_info: dict[str, RepositoryBranchInfo] = Field(default_factory=dict)

poetry.lock

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pre-commit = "^2.20.0"
6767
types-toml = "*"
6868
types-ujson = "*"
6969
types-pyyaml = "*"
70-
ruff = "0.7.1"
70+
ruff = "0.8.6"
7171
pytest-xdist = "^3.3.1"
7272
types-python-slugify = "^8.0.0.3"
7373
invoke = "^2.2.0"
@@ -252,6 +252,7 @@ ignore = [
252252
"FURB110", # Replace ternary `if` expression with `or` operator
253253
"FURB113", # Use `lines.extend((" " * self.indentation + "}", "}"))` instead of repeatedly calling `lines.append()`
254254
"FURB177", # Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
255+
"INP001", # File declares a package, but is nested under an implicit namespace package.
255256
"N802", # Function name should be lowercase
256257
"N806", # Variable in function should be lowercase
257258
"PERF203", # `try`-`except` within a loop incurs performance overhead
@@ -267,10 +268,12 @@ ignore = [
267268
"PLW1641", # Object does not implement `__hash__` method
268269
"PTH100", # `os.path.abspath()` should be replaced by `Path.resolve()`
269270
"PTH109", # `os.getcwd()` should be replaced by `Path.cwd()`
271+
"PYI061", # [*] `Literal[None]` can be replaced with `None`
270272
"RET504", # Unnecessary assignment to `data` before `return` statement
271273
"RUF005", # Consider `[*path, str(key)]` instead of concatenation
272274
"RUF015", # Prefer `next(iter(input_data["variables"].keys()))` over single element slice
273275
"RUF029", # Function is declared `async`, but doesn't `await` or use `async` features.
276+
"RUF056", # [*] Avoid providing a falsy fallback to `dict.get()` in boolean test positions. The default fallback `None` is already falsy.
274277
"S108", # Probable insecure usage of temporary file or directory
275278
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
276279
"S701", # By default, jinja2 sets `autoescape` to `False`. Consider using `autoescape=True`
@@ -282,7 +285,7 @@ ignore = [
282285
"SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
283286
"SIM118", # Use `key in dict` instead of `key in dict.keys)
284287
"SIM910", # Use `data.get(key)` instead of `data.get(key, None)`
285-
"TCH003", # Move standard library import `collections.abc.Iterable` into a type-checking block
288+
"TC003", # Move standard library import `collections.abc.Iterable` into a type-checking block
286289
"UP031", # Use format specifiers instead of percent format
287290
]
288291

0 commit comments

Comments
 (0)