Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a basic stub file generator #369

Merged
merged 25 commits into from Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
92c7b05
Adds stubgen
davidselassie Jan 12, 2024
b86903d
Moves PyO3 inner module to `_bytewax`
davidselassie Jan 12, 2024
f7f83ac
stubgen no longer emits trailing whitespace in docstrings
davidselassie Jan 12, 2024
19dd117
Fixes all Python docstrings in Rust code to have proper formatting
davidselassie Jan 12, 2024
8674ff3
Topo sorts stubgen output so subclasses always work
davidselassie Jan 12, 2024
628f35a
Makes stubgen deps depend on Python version; we don't need them in >=…
davidselassie Jan 12, 2024
8034f1b
Adds `bytewax._bytewax` stub file; will need to be re-generated on re…
davidselassie Jan 12, 2024
c757543
Fixes conditional Python version deps
davidselassie Jan 12, 2024
13683ea
Fixes type annotations in Rust docstrings
davidselassie Jan 12, 2024
4973e0c
Bad docstring arg formatting
davidselassie Jan 12, 2024
2d75eda
Updates stubs
davidselassie Jan 12, 2024
98b18ee
Adds vermin ignores in subgen; we're handling 3.8 fallbacks
davidselassie Jan 12, 2024
1348ab9
stubgen now outputs all magic methods; the documentation system can h…
davidselassie Jan 13, 2024
38207ee
Special case class' __new__ to get the correct signature
davidselassie Jan 13, 2024
d274d9e
Bad formatting in a docstring
davidselassie Jan 13, 2024
ea97407
Special case __hash__ to handle `None`
davidselassie Jan 13, 2024
7bac0d0
Updates stubs
davidselassie Jan 13, 2024
04e93cc
Fixes minor RecoveryConfig docstring formatting
davidselassie Jan 16, 2024
de90940
No longer need to hide `bytewax.bytewax` from API docs
davidselassie Jan 16, 2024
75830d1
No return annotation on __new__; the class name can't be used unquoted
davidselassie Jan 16, 2024
051411e
Rewrite classes with __new__ to __init__ so pylsp works
davidselassie Jan 16, 2024
b06386b
Updates stubs
davidselassie Jan 16, 2024
e89b9ef
Better description of deriving __init__
davidselassie Jan 16, 2024
887f7b5
Updates stubs
davidselassie Jan 16, 2024
faec603
Adds stubgen to release process
davidselassie Jan 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -33,4 +33,4 @@ repos:
# field in pyproject.toml. Add a `-` after the Python version
# to say for `3.8-` "even if this code would work on 3.7,
# that's fine".
args: ["--eval-annotations", "--no-parse-comments", "--no-tips", "--violations", "-t=3.8-"]
args: ["--eval-annotations", "--no-tips", "--violations", "-t=3.8-"]
3 changes: 3 additions & 0 deletions pyproject.toml
Expand Up @@ -42,6 +42,8 @@ docs = [
]
dev = [
"bytewax[cbfmt,docs,kafka,test]",
"astor==0.8.1 ; python_version <= '3.8'",
"graphlib_backport==1.0.3 ; python_version <= '3.8'",
"pre-commit==2.19.0",
"ruff==0.1.8",
"vermin==1.5.2",
Expand Down Expand Up @@ -76,6 +78,7 @@ testpaths = [
]

[tool.maturin]
module-name = "bytewax._bytewax"
python-source = "pysrc"

[tool.mypy]
Expand Down