-
-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for packaging type stubs in pure Rust project layout
- Loading branch information
Showing
5 changed files
with
60 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
|
||
import pyo3_pure | ||
|
||
assert pyo3_pure.DummyClass.get_42() == 42 | ||
|
||
# Check type stub | ||
install_path = os.path.join(os.path.dirname(pyo3_pure.__file__)) | ||
assert os.path.exists(os.path.join(install_path, "__init__.pyi")) | ||
assert os.path.exists(os.path.join(install_path, "py.typed")) | ||
|
||
print("SUCCESS") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class DummyClass: | ||
@staticmethod | ||
def get_42(self) -> int: ... | ||
|
||
fourtytwo: int |