Skip to content

Commit

Permalink
pyp: more py313 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Nov 3, 2024
1 parent fec93e8 commit 5af2a58
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- {python: '3.10', tox: py310}
- {python: '3.11', tox: py311}
- {python: '3.12', tox: py312}
- {python: '3.13-dev', tox: py313}
- {python: '3.13', tox: py313}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
5 changes: 3 additions & 2 deletions pyp.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ def build(self) -> ast.Module:
for node in dfs_walk(ret):
if isinstance(node, ast.stmt):
i += 1
node.lineno = i
node.end_lineno = i
node.lineno = i # type: ignore[attr-defined]
node.end_lineno = i # type: ignore[attr-defined]

return ast.fix_missing_locations(ret)

Expand Down Expand Up @@ -656,6 +656,7 @@ def code_for_line(lineno: int) -> str:
if sys.version_info >= (3, 13):
fs._lines = code_for_line(fs.lineno) # type: ignore[attr-defined]
fs.colno = None
fs.lineno = "PYP_REDACTED" # type: ignore[assignment]
else:
fs._line = code_for_line(fs.lineno) # type: ignore[attr-defined]
fs.lineno = "PYP_REDACTED" # type: ignore[assignment]
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
skipsdist = True
envlist = py39, py311, lint, mypy
envlist = py39, py311, py313, lint, mypy

[testenv]
deps = pytest
Expand All @@ -20,10 +20,10 @@ commands =
isort --diff --check --quiet .

[testenv:mypy]
deps = mypy>=1.8
deps = mypy>=1.13
commands =
mypy --strict -m pyp --python-version 3.8
mypy --strict -m pyp --python-version 3.12
mypy --strict -m pyp --python-version 3.13

[coverage:report]
exclude_lines =
Expand Down

0 comments on commit 5af2a58

Please sign in to comment.