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

Chore(deps): Update ruff requirement from <0.9 to <0.10 #91

Merged
merged 2 commits into from
Feb 1, 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
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ optional-dependencies.develop = [
"mypy<1.14",
"poethepoet<0.32",
"pyproject-fmt<2.6",
"ruff<0.9",
"ruff<0.10",
"validate-pyproject<0.24",
]
optional-dependencies.doc = [
Expand Down Expand Up @@ -217,9 +217,6 @@ lint.per-file-ignores."examples/*" = [
"T201", # Allow `print`
]

# ===================
# Tasks configuration
# ===================
lint.per-file-ignores."tests/*" = [
"S101", # Allow use of `assert`, and `print`.
]
Expand Down Expand Up @@ -298,6 +295,10 @@ non_interactive = true
method = "git"
default-tag = "0.0.0"

# ===================
# Tasks configuration
# ===================

[tool.poe.tasks]

check = [
Expand Down
4 changes: 2 additions & 2 deletions src/commons_codec/transform/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def to_sql(self, event: t.Dict[str, t.Any]) -> t.Union[SQLOperation, None]:
oid: str = self.get_document_key(event)
document = self.get_full_document(event)
record = self.converter.decode_document(document)
sql = f"INSERT INTO {self.table_name} " f"({self.ID_COLUMN}, {self.DATA_COLUMN}) " "VALUES (:oid, :record);"
sql = f"INSERT INTO {self.table_name} ({self.ID_COLUMN}, {self.DATA_COLUMN}) VALUES (:oid, :record);"
parameters = {"oid": oid, "record": record}

# In order to use "full document" representations from "update" events,
Expand All @@ -325,7 +325,7 @@ def to_sql(self, event: t.Dict[str, t.Any]) -> t.Union[SQLOperation, None]:
document = self.get_full_document(event)
record = self.converter.decode_document(document)
where_clause = self.where_clause(event)
sql = f"UPDATE {self.table_name} " f"SET {self.DATA_COLUMN} = :record " f"WHERE {where_clause};"
sql = f"UPDATE {self.table_name} SET {self.DATA_COLUMN} = :record WHERE {where_clause};"
parameters = {"record": record}

elif operation_type == "delete":
Expand Down
1 change: 1 addition & 0 deletions src/commons_codec/util/io.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ruff: noqa: A005
# Copyright (c) 2016-2024, The Kotori Developers and contributors.
# Distributed under the terms of the LGPLv3 license, see LICENSE.
import json
Expand Down
1 change: 1 addition & 0 deletions src/commons_codec/vendor/boto3/dynamodb/types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ruff: noqa: A005
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
Expand Down
6 changes: 3 additions & 3 deletions tests/decode/test_sensor_community.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ def assert_type(value: t.Any, type_: t.Type):
"""
Assertion helper with better error reporting.
"""
assert isinstance(
value, type_
), f"Value is of type '{type(value).__name__}', but should be '{type_.__name__}' instead"
assert isinstance(value, type_), (
f"Value is of type '{type(value).__name__}', but should be '{type_.__name__}' instead"
)