Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge stable into develop to upgrade ruff #222

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
run: "pip install ruff==0.7.1"
run: "pip install ruff==0.8.6"
- name: "Linting: ruff check"
run: "ruff check ."
- name: "Linting: ruff format"
Expand Down
5 changes: 3 additions & 2 deletions infrahub_sdk/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pydantic import BaseModel, ConfigDict, Field

from .node import InfrahubNode # noqa: TCH001
from .node import InfrahubNode # noqa: TC001


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

branch_info: dict[str, RepositoryBranchInfo] = Field(default_factory=dict)
Expand Down
42 changes: 21 additions & 21 deletions poetry.lock

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

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

Expand Down
Loading