From 7f13f2b5fa224199e22bd5de209ee2c74433ef89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:20:56 +0000 Subject: [PATCH 1/2] Update ruff requirement from <0.9 to <0.10 in /cratedb_sqlparse_py Updates the requirements on [ruff](https://github.com/astral-sh/ruff) to permit the latest version. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.18...0.9.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- cratedb_sqlparse_py/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cratedb_sqlparse_py/pyproject.toml b/cratedb_sqlparse_py/pyproject.toml index 86f14f1..2055850 100644 --- a/cratedb_sqlparse_py/pyproject.toml +++ b/cratedb_sqlparse_py/pyproject.toml @@ -81,7 +81,7 @@ develop = [ "mypy<1.15", "poethepoet<0.33", "pyproject-fmt<2.6", - "ruff<0.9", + "ruff<0.10", "validate-pyproject<0.24", ] generate = [ From 30a7cce7c926e2e55fc6df75a067e90eed2a149a Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Wed, 15 Jan 2025 22:59:57 +0100 Subject: [PATCH 2/2] Chore: Format code using Ruff 0.9 --- cratedb_sqlparse_py/cratedb_sqlparse/parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cratedb_sqlparse_py/cratedb_sqlparse/parser.py b/cratedb_sqlparse_py/cratedb_sqlparse/parser.py index 452abd3..6134a1a 100644 --- a/cratedb_sqlparse_py/cratedb_sqlparse/parser.py +++ b/cratedb_sqlparse_py/cratedb_sqlparse/parser.py @@ -1,3 +1,4 @@ +# ruff: noqa: A005 # Module `parser` shadows a Python standard-library module from typing import List from antlr4 import CommonTokenStream, InputStream, RecognitionException, Token @@ -181,7 +182,7 @@ def type(self): return self.ctx.start.text def __repr__(self): - return f'{self.__class__.__qualname__}<{self.query if len(self.query) < 15 else self.query[:15] + "..."}>' + return f"{self.__class__.__qualname__}<{self.query if len(self.query) < 15 else self.query[:15] + '...'}>" def find_suitable_error(statement, errors):