Skip to content
Merged
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions Tools/build/consts_getter.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import os
from pathlib import Path

ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
INTERNAL = os.path.join(ROOT, 'Include', 'internal')
ROOT = Path(__file__).resolve().parents[2]
INTERNAL = ROOT / "Include" / "internal"

def get_nsmallnegints_and_nsmallposints() -> tuple[int, int]:
nsmallposints = None
nsmallnegints = None
with open(os.path.join(INTERNAL, 'pycore_runtime_structs.h')) as infile:

Check failure on line 9 in Tools/build/consts_getter.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (F821)

Tools/build/consts_getter.py:9:15: F821 Undefined name `os`
for line in infile:
if line.startswith('#define _PY_NSMALLPOSINTS'):
nsmallposints = int(line.split()[-1])
Expand Down
Loading