From 1735ad58f71e1b53765d96cb06bd110473395fb2 Mon Sep 17 00:00:00 2001 From: Tim Hatch Date: Thu, 10 Sep 2026 07:45:58 -0700 Subject: [PATCH 1/3] Build Markdown queries with the current Tree-sitter API --- markdown/long_links.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/markdown/long_links.py b/markdown/long_links.py index d41156a..a9affd1 100644 --- a/markdown/long_links.py +++ b/markdown/long_links.py @@ -2,18 +2,17 @@ from pathlib import Path from tree_sitter_markdown import language, inline_language -from tree_sitter import Parser, Language, QueryCursor +from tree_sitter import Language, Parser, Query, QueryCursor block_language = Language(language()) block_parser = Parser(block_language) -link_reference_def = block_language.query("(link_reference_definition) @node") -section = block_language.query("(section) @node") -inline = block_language.query("(inline) @node") +link_reference_def = Query(block_language, "(link_reference_definition) @node") +inline = Query(block_language, "(inline) @node") inline_language = Language(inline_language()) inline_parser = Parser(inline_language) -inline_link = inline_language.query("(inline_link) @node") +inline_link = Query(inline_language, "(inline_link) @node") def node_matches(query, node): for idx, match in QueryCursor(query).matches(node): From c693f66815899ac63fd412bdca5df6fd781263b8 Mon Sep 17 00:00:00 2001 From: Tim Hatch Date: Thu, 10 Sep 2026 07:51:20 -0700 Subject: [PATCH 2/3] Keep isolated rule tests within their declared inputs --- deps/tests/bump/main/input/requirements.txt | 2 +- deps/tests/bump/main/output/requirements.txt | 2 +- .../main/input/{ => tests}/test_example.py | 0 pytest/tests/fixture_names/main/output/output.txt | 14 +++++++------- 4 files changed, 9 insertions(+), 9 deletions(-) rename pytest/tests/fixture_names/main/input/{ => tests}/test_example.py (100%) diff --git a/deps/tests/bump/main/input/requirements.txt b/deps/tests/bump/main/input/requirements.txt index eb8e9d9..2cb0f0e 100644 --- a/deps/tests/bump/main/input/requirements.txt +++ b/deps/tests/bump/main/input/requirements.txt @@ -1 +1 @@ -click==6.0 +click<8.4 diff --git a/deps/tests/bump/main/output/requirements.txt b/deps/tests/bump/main/output/requirements.txt index 40389d3..2cb0f0e 100644 --- a/deps/tests/bump/main/output/requirements.txt +++ b/deps/tests/bump/main/output/requirements.txt @@ -1 +1 @@ -click==8.3.2 +click<8.4 diff --git a/pytest/tests/fixture_names/main/input/test_example.py b/pytest/tests/fixture_names/main/input/tests/test_example.py similarity index 100% rename from pytest/tests/fixture_names/main/input/test_example.py rename to pytest/tests/fixture_names/main/input/tests/test_example.py diff --git a/pytest/tests/fixture_names/main/output/output.txt b/pytest/tests/fixture_names/main/output/output.txt index 237a71a..563a4ae 100644 --- a/pytest/tests/fixture_names/main/output/output.txt +++ b/pytest/tests/fixture_names/main/output/output.txt @@ -1,7 +1,7 @@ -test_example.py:9:4: no need to make things look private in tests: '_plain_fixture' -test_example.py:15:4: no need to make things look private in tests: '_called_fixture' -test_example.py:21:4: no need to make things look private in tests: '_autouse_fixture' -test_example.py:27:4: no need to make things look private in tests: '_direct_fixture' -test_example.py:33:4: no need to make things look private in tests: '_aliased_module_fixture' -test_example.py:39:4: no need to make things look private in tests: '_aliased_direct_fixture' -test_example.py:45:10: no need to make things look private in tests: '_async_fixture' +tests/test_example.py:9:4: no need to make things look private in tests: '_plain_fixture' +tests/test_example.py:15:4: no need to make things look private in tests: '_called_fixture' +tests/test_example.py:21:4: no need to make things look private in tests: '_autouse_fixture' +tests/test_example.py:27:4: no need to make things look private in tests: '_direct_fixture' +tests/test_example.py:33:4: no need to make things look private in tests: '_aliased_module_fixture' +tests/test_example.py:39:4: no need to make things look private in tests: '_aliased_direct_fixture' +tests/test_example.py:45:10: no need to make things look private in tests: '_async_fixture' From d692af6f46894af22fd9b477ca9f553b4fc8b1e5 Mon Sep 17 00:00:00 2001 From: Tim Hatch Date: Thu, 10 Sep 2026 07:53:04 -0700 Subject: [PATCH 3/3] Exercise dependency bumps with stable Six releases --- deps/tests/bump/main/input/requirements.txt | 2 +- deps/tests/bump/main/output/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/tests/bump/main/input/requirements.txt b/deps/tests/bump/main/input/requirements.txt index 2cb0f0e..3b370b7 100644 --- a/deps/tests/bump/main/input/requirements.txt +++ b/deps/tests/bump/main/input/requirements.txt @@ -1 +1 @@ -click<8.4 +six==1.16.0 diff --git a/deps/tests/bump/main/output/requirements.txt b/deps/tests/bump/main/output/requirements.txt index 2cb0f0e..0e2ed8b 100644 --- a/deps/tests/bump/main/output/requirements.txt +++ b/deps/tests/bump/main/output/requirements.txt @@ -1 +1 @@ -click<8.4 +six==1.17.0