Skip to content
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
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"recommendations": [
"ms-python.python",
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed the Pylance extension recommendation, but the repo’s VS Code settings still use python.analysis.* inlay hint settings (provided by Pylance). Either keep recommending ms-python.vscode-pylance, or update/remove those settings (and document the ty extension configuration) so the recommended extension set matches the workspace settings.

Suggested change
"ms-python.python",
"ms-python.python",
"ms-python.vscode-pylance",

Copilot uses AI. Check for mistakes.
"ms-python.vscode-pylance",
"astral-sh.ty",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"EditorConfig.EditorConfig",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ All output follows consistent formatting rules so both humans and LLMs can parse

```bash
uv run ruff check
uv run pyright
uv run ty check --error-on-warning src/gh_llm tests
uv run pytest -q
```

Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fmt:
prettier --write '**/*.md'

lint:
uv run pyright src/gh_llm tests
uv run ty check --error-on-warning src/gh_llm tests
uv run ruff check .

fmt-docs:
Expand Down
9 changes: 1 addition & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,12 @@ gh-llm = "gh_llm.__main__:main"

[dependency-groups]
dev = [
"pyright>=1.1.407",
"ty>=0.0.32",
"ruff>=0.14.10",
"pytest>=9.0.2",
"pytest-rerunfailures>=16.1",
]

[tool.pyright]
include = ["src/gh_llm", "tests"]
pythonVersion = "3.14"
typeCheckingMode = "strict"

[tool.ruff]
line-length = 120
target-version = "py314"
Expand Down Expand Up @@ -85,8 +80,6 @@ select = [
]
ignore = [
"E501", # line too long, duplicate with ruff fmt
"F401", # imported but unused, duplicate with pyright
"F841", # local variable is assigned to but never used, duplicate with pyright
]
future-annotations = true

Expand Down
2 changes: 1 addition & 1 deletion src/gh_llm/pr_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def build_pull_request_body_scaffold(

existing_titles = {normalize_section_title(title) for title in extract_markdown_section_titles(cleaned_template)}
added_sections: list[str] = []
blocks = [cleaned_template]
blocks: list[str] = [cleaned_template]

for section in required_sections:
normalized = normalize_section_title(section)
Expand Down
16 changes: 8 additions & 8 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ def test_extract_diff_hunks_prefers_first_added_line_for_right_side() -> None:
]
)

hunks = pr_commands._extract_diff_hunks(diff) # pyright: ignore[reportPrivateUsage]
hunks = pr_commands._extract_diff_hunks(diff)

assert len(hunks) == 1
assert hunks[0].path == "paddle/phi/kernels/funcs/abs.h"
Expand All @@ -1602,7 +1602,7 @@ def test_extract_diff_hunks_uses_real_new_file_line_numbers_on_right_side() -> N
]
)

hunks = pr_commands._extract_diff_hunks(diff) # pyright: ignore[reportPrivateUsage]
hunks = pr_commands._extract_diff_hunks(diff)

assert len(hunks) == 1
assert hunks[0].path == "src/gh_llm/commands/pr.py"
Expand All @@ -1612,7 +1612,7 @@ def test_extract_diff_hunks_uses_real_new_file_line_numbers_on_right_side() -> N


def test_render_numbered_hunk_lines_preserves_real_right_side_line_numbers() -> None:
hunk = pr_commands._DiffHunk( # pyright: ignore[reportPrivateUsage]
hunk = pr_commands._DiffHunk(
path="src/gh_llm/commands/pr.py",
header="@@ -890,6 +890,7 @@ def _extract_diff_hunks(diff: str) -> list[_DiffHunk]:",
anchor_line=893,
Expand All @@ -1631,7 +1631,7 @@ def test_render_numbered_hunk_lines_preserves_real_right_side_line_numbers() ->
match_paths={"src/gh_llm/commands/pr.py"},
)

rendered = pr_commands._render_numbered_hunk_lines(hunk) # pyright: ignore[reportPrivateUsage]
rendered = pr_commands._render_numbered_hunk_lines(hunk)

assert "L 890 R 890 | current_hunk_lines: list[str] = []" in rendered
assert "L 891 R 891 | current_old_line = 0" in rendered
Expand All @@ -1640,7 +1640,7 @@ def test_render_numbered_hunk_lines_preserves_real_right_side_line_numbers() ->


def test_inline_review_thread_blocks_do_not_fallback_from_current_right_anchor_to_original_left_line() -> None:
current_hunk = pr_commands._DiffHunk( # pyright: ignore[reportPrivateUsage]
current_hunk = pr_commands._DiffHunk(
path="paddle/phi/api/include/compat/ATen/ops/from_blob.h",
header="@@ -18,3 +80,4 @@",
anchor_line=81,
Expand All @@ -1654,7 +1654,7 @@ def test_inline_review_thread_blocks_do_not_fallback_from_current_right_anchor_t
right_commentable_lines={80, 81, 82},
match_paths={"paddle/phi/api/include/compat/ATen/ops/from_blob.h"},
)
stale_hunk = pr_commands._DiffHunk( # pyright: ignore[reportPrivateUsage]
stale_hunk = pr_commands._DiffHunk(
path="paddle/phi/api/include/compat/ATen/ops/from_blob.h",
header="@@ -80,4 +210,1 @@",
anchor_line=210,
Expand Down Expand Up @@ -1684,7 +1684,7 @@ def test_inline_review_thread_blocks_do_not_fallback_from_current_right_anchor_t
comments=(),
)

blocks_by_hunk = pr_commands._build_inline_review_thread_blocks_for_file( # pyright: ignore[reportPrivateUsage]
blocks_by_hunk = pr_commands._build_inline_review_thread_blocks_for_file(
hunks=[current_hunk, stale_hunk],
summaries=[summary],
extra_contexts=[None, None],
Expand Down Expand Up @@ -2897,7 +2897,7 @@ def test_pr_body_template_finds_docs_template_directory(

def test_decode_repository_contents_text_returns_none_for_invalid_base64() -> None:
payload: dict[str, object] = {"encoding": "base64", "content": "A"}
assert github_api._decode_repository_contents_text(payload) is None # pyright: ignore[reportPrivateUsage]
assert github_api._decode_repository_contents_text(payload) is None


def test_pr_body_template_surfaces_non_404_lookup_failures(
Expand Down
49 changes: 21 additions & 28 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading