-
Notifications
You must be signed in to change notification settings - Fork 21
Make the spec implementation in this repo type checkable #187
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
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
5273b64
wip
MarcoGorelli da5324e
get mypy --strict passing
MarcoGorelli 436b819
add CI
MarcoGorelli e8f5ca7
typo
MarcoGorelli 8ce48df
wip
MarcoGorelli 38e0276
keep to .py, but disable empty-body code
MarcoGorelli 8f46009
add missing files
MarcoGorelli 69c3283
fixup!
MarcoGorelli 08f085e
fixup some types
MarcoGorelli 4465e67
some corrections
MarcoGorelli 51f5425
fixup again
MarcoGorelli b654dad
wip
MarcoGorelli a096091
getting there?
MarcoGorelli b3847d0
fixup
MarcoGorelli ffcd9e0
getting there?
MarcoGorelli a474d59
export DataFrame and Column
MarcoGorelli 38259ab
ignore some nitpicks for now
MarcoGorelli a4d81fc
more fixups
MarcoGorelli cb2f1e4
remove unnecessary file
MarcoGorelli b7c00fb
few more corrections
MarcoGorelli cfaafa5
use mypy.ini
MarcoGorelli e92a784
revert making DataFrame generic
MarcoGorelli b67398e
revert making Scalar generic
MarcoGorelli f28ddcd
remove DType class
MarcoGorelli 06f8aa8
fixup
MarcoGorelli 7a26f3a
dont export Scalar, replace it with Any
MarcoGorelli 56c6293
make self: Column[DType] explicit
MarcoGorelli 314ab42
preserve Column[int] in docs
MarcoGorelli 4ddbae1
simplify further
MarcoGorelli ea7a81a
reduce diff
MarcoGorelli 4a740b9
reduce diff
MarcoGorelli d6a6e87
get docs building again
MarcoGorelli 526a5d7
further reduce diff
MarcoGorelli e136060
Merge remote-tracking branch 'upstream/main' into make-type-checkable
MarcoGorelli 5486e22
introduce Scalar type alias
MarcoGorelli 6a8a428
fixup
MarcoGorelli e2d3068
fixup mypy
MarcoGorelli 59140c2
reduce diff
MarcoGorelli 9fd840a
fix return types;
MarcoGorelli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,32 @@ | ||
name: mypy | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
tox: | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.11"] | ||
os: [ubuntu-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache multiple paths | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
$RUNNER_TOOL_CACHE/Python/* | ||
~\AppData\Local\pip\Cache | ||
key: ${{ runner.os }}-build-${{ matrix.python-version }} | ||
- name: install-reqs | ||
run: python -m pip install --upgrade mypy==1.4.0 | ||
- name: run mypy | ||
run: cd spec/API_specification && mypy dataframe_api |
This file contains hidden or 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 @@ | ||
[mypy] | ||
strict=True | ||
|
||
[mypy-dataframe_api.*] | ||
disable_error_code=empty-body |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dtype: DType
seems more specific that it actually needs to be a dtype instance, and not eg a string repr?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that too, but I think it can't be addressed with a type alias like I suggested for
Scalar
, becauseDType
is already aTypeVar
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's address #189 first, then we can figure out how to type this
for now I've marked as
Any
to not block the benefits which this PR brings