-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check-in stub files and add option to check that existing stubs match checked in versions. As a result of isolated builds running any kind of python script with the module dependencies requires a lot of customisation that goes against python build tools
- Loading branch information
1 parent
35eddc4
commit e356037
Showing
16 changed files
with
496 additions
and
15 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 was deleted.
Oops, something went wrong.
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,7 @@ | ||
from __future__ import annotations | ||
|
||
def sum(buf, /): ... | ||
|
||
class ConstantBuffer: | ||
def __init__(elem, length, /): | ||
pass |
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,50 @@ | ||
from __future__ import annotations | ||
|
||
class Animal: | ||
def species(self, /): ... | ||
|
||
class ConstructableClass: | ||
def __init__(count, /): | ||
pass | ||
|
||
class Counter: | ||
def __init__(): | ||
pass | ||
def increment(self, /): ... | ||
|
||
count: ... | ||
|
||
class Hash: | ||
def __init__(x, /): | ||
pass | ||
def __hash__(self, /): | ||
""" | ||
Return hash(self). | ||
""" | ||
... | ||
|
||
class Math: | ||
def add(x, y, /): ... | ||
|
||
class SomeClass: | ||
""" | ||
Some class defined in Zig accessible from Python | ||
""" | ||
|
||
class User: | ||
def __init__(name, /): | ||
pass | ||
@property | ||
def email(self): ... | ||
@property | ||
def greeting(self): ... | ||
|
||
class ZigOnlyMethod: | ||
def __init__(x, /): | ||
pass | ||
def reexposed(self, /): ... | ||
|
||
class Dog(Animal): | ||
def __init__(breed, /): | ||
pass | ||
def breed(self, /): ... |
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,4 @@ | ||
from __future__ import annotations | ||
|
||
def raise_custom_error(): ... | ||
def raise_value_error(message, /): ... |
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,4 @@ | ||
from __future__ import annotations | ||
|
||
def double(x, /): ... | ||
def with_kwargs(x, /, *, y=42.0): ... |
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,3 @@ | ||
from __future__ import annotations | ||
|
||
def hello(): ... |
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,19 @@ | ||
from __future__ import annotations | ||
|
||
class Range: | ||
def __init__(lower, upper, step, /): | ||
pass | ||
def __iter__(self, /): | ||
""" | ||
Implement iter(self). | ||
""" | ||
... | ||
|
||
class RangeIterator: | ||
def __init__(next, stop, step, /): | ||
pass | ||
def __next__(self, /): | ||
""" | ||
Implement next(self). | ||
""" | ||
... |
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,4 @@ | ||
from __future__ import annotations | ||
|
||
def append(left, /): ... | ||
def concat(left, /): ... |
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,16 @@ | ||
""" | ||
Zig multi-line strings make it easy to define a docstring... | ||
..with lots of lines! | ||
P.S. I'm sure one day we'll hook into Zig's AST and read the Zig doc comments ;) | ||
""" | ||
from __future__ import annotations | ||
|
||
def count(): ... | ||
def hello(name, /): ... | ||
def increment(): ... | ||
def whoami(): ... | ||
|
||
class submod: | ||
def world(): ... |
Oops, something went wrong.