Skip to content

Commit a53324a

Browse files
committed
update ruff to v0.14.10, lint target to py310
* Set ruff linter to v0.14.10 in pyproject.toml, using "~=" operator for greater predictability. * Update target linting version to py310 since Python 3.9 is no longer supported. * Add "strict" argument to uses of zip() to satisfy py310 lint.
1 parent a85317c commit a53324a

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Bug Fixes
1616
Internal
1717
--------
1818
* Refine documentation for Windows.
19+
* Target Python 3.10 for linting.
1920

2021

2122
1.42.0 (2025/12/20)

mycli/packages/special/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def sql_using_llm(
304304
row = cur.fetchone()
305305
if row is None:
306306
continue
307-
sample_data[table_name] = list(zip(cols, row))
307+
sample_data[table_name] = list(zip(cols, row, strict=True))
308308
args = [
309309
"--template",
310310
LLM_TEMPLATE_NAME,

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ dev = [
5555
"llm>=0.19.0",
5656
"setuptools", # Required by llm commands to install models
5757
"pip",
58-
"ruff>=0.14.6",
58+
"ruff~=0.14.10",
5959
]
6060

6161
[project.scripts]
@@ -68,7 +68,7 @@ mycli = ["myclirc", "AUTHORS", "SPONSORS"]
6868
include = ["mycli*"]
6969

7070
[tool.ruff]
71-
target-version = 'py39'
71+
target-version = 'py310'
7272
line-length = 140
7373

7474
[tool.ruff.lint]

test/test_special_iocommands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,15 @@ def test_split_sql_by_delimiter():
291291
mycli.packages.special.set_delimiter(delimiter_str)
292292
sql_input = f"select 1{delimiter_str} select \ufffc2"
293293
queries = ("select 1", "select \ufffc2")
294-
for query, parsed_query in zip(queries, mycli.packages.special.split_queries(sql_input)):
294+
for query, parsed_query in zip(queries, mycli.packages.special.split_queries(sql_input), strict=True):
295295
assert query == parsed_query
296296

297297

298298
def test_switch_delimiter_within_query():
299299
mycli.packages.special.set_delimiter(";")
300300
sql_input = "select 1; delimiter $$ select 2 $$ select 3 $$"
301301
queries = ("select 1", "delimiter $$ select 2 $$ select 3 $$", "select 2", "select 3")
302-
for query, parsed_query in zip(queries, mycli.packages.special.split_queries(sql_input)):
302+
for query, parsed_query in zip(queries, mycli.packages.special.split_queries(sql_input), strict=True):
303303
assert query == parsed_query
304304

305305

0 commit comments

Comments
 (0)