Skip to content

Commit 21deae5

Browse files
committed
fix: topological sort pybind to keep stub order
1 parent 853754a commit 21deae5

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ clangcompile:
2929

3030
# Auto generation of CPP binding stub files
3131
stubgen:
32-
pybind11-stubgen -o python --numpy-array-use-type-var rcs
32+
pybind11-stubgen -o python --numpy-array-use-type-var --sort-by topological rcs
3333
find ./python -name '*.pyi' -print | xargs sed -i '1s/^/# ATTENTION: auto generated from C++ code, use `make stubgen` to update!\n/'
3434
find ./python -not -path "./python/rcs/_core/*" -name '*.pyi' -delete
3535
find ./python/rcs/_core -name '*.pyi' -print | xargs sed -i 's/tuple\[typing\.Literal\[\([0-9]\+\)\], typing\.Literal\[1\]\]/tuple\[typing\.Literal[\1]\]/g'

‎extensions/rcs_fr3/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ clangcompile:
2222

2323
# Auto generation of CPP binding stub files
2424
stubgen:
25-
pybind11-stubgen -o src --numpy-array-use-type-var rcs_fr3
25+
pybind11-stubgen -o src --numpy-array-use-type-var --sort-by topological rcs_fr3
2626
find ./${PYSRC} -name '*.pyi' -print | xargs sed -i '1s/^/# ATTENTION: auto generated from C++ code, use `make stubgen` to update!\n/'
2727
find ./${PYSRC} -not -path "./${PYSRC}/_core/*" -name '*.pyi' -delete
2828
find ./${PYSRC}/_core -name '*.pyi' -print | xargs sed -i 's/tuple\[typing\.Literal\[\([0-9]\+\)\], typing\.Literal\[1\]\]/tuple\[typing\.Literal[\1]\]/g'

‎extensions/rcs_panda/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ clangcompile:
2222

2323
# Auto generation of CPP binding stub files
2424
stubgen:
25-
pybind11-stubgen -o src --numpy-array-use-type-var rcs_panda
25+
pybind11-stubgen -o src --numpy-array-use-type-var --sort-by topological rcs_panda
2626
find ./${PYSRC} -name '*.pyi' -print | xargs sed -i '1s/^/# ATTENTION: auto generated from C++ code, use `make stubgen` to update!\n/'
2727
find ./${PYSRC} -not -path "./${PYSRC}/_core/*" -name '*.pyi' -delete
2828
find ./${PYSRC}/_core -name '*.pyi' -print | xargs sed -i 's/tuple\[typing\.Literal\[\([0-9]\+\)\], typing\.Literal\[1\]\]/tuple\[typing\.Literal[\1]\]/g'

0 commit comments

Comments
 (0)