Skip to content

Commit

Permalink
Merge pull request #221 from opsmill/pog-stable-ruff
Browse files Browse the repository at this point in the history
Upgrade ruff=0.8.6
  • Loading branch information
ogenstad authored Jan 7, 2025
2 parents 9d9b99f + 36b975d commit d617bdd
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 26 deletions.
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

0 comments on commit d617bdd

Please sign in to comment.