-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
[WIP] fix --check-untyped-defs for MyPy #28339
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
310 commits
Select commit
Hold shift + click to select a range
f957c3c
check_untyped_defs pandas.io.parquet
simonjayhawkins c6253f0
check_untyped_defs pandas.io.excel._base
simonjayhawkins 8daddd7
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 6069ccf
add files to setup.cfg
simonjayhawkins ddd1a90
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 33a016d
check_untyped_defs pandas.core.window.rolling
simonjayhawkins 36fa28e
check_untyped_defs pandas.core.sparse.frame
simonjayhawkins e5f8418
check_untyped_defs pandas.core.series
simonjayhawkins ca27d47
resolve merge conflict
simonjayhawkins 5c1fc49
mypy fix following merge of #28395
simonjayhawkins b37e94d
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 39fedfe
check_untyped_defs pandas.core.ops.docstrings
simonjayhawkins dfb2b1a
check_untyped_defs pandas.core.indexing
simonjayhawkins 55ccb83
check_untyped_defs pandas.core.computation.scope
simonjayhawkins 7121d9c
pandas.core.computation.pytables (part)
simonjayhawkins 4aaadfa
resolve merge conflicts
simonjayhawkins 2e78276
ci fixups
simonjayhawkins 3dd747c
check_untyped_defs pandas.core.computation.ops xref #28446
simonjayhawkins 7865f21
check_untyped_defs pandas.core.computation.engines
simonjayhawkins 24b7604
check_untyped_defs pandas.core.arrays.sparse
simonjayhawkins e68bcaf
check_untyped_defs pandas.tseries.offsets
simonjayhawkins 49e2835
check_untyped_defs pandas.core.strings
simonjayhawkins 077d7fd
check_untyped_defs pandas.core.reshape.pivot
simonjayhawkins 7f9158e
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins f83d9f3
resolve merge conflicts
simonjayhawkins 2ee312d
resolve merge conflicts
simonjayhawkins 7d5a62b
update setup.cfg
simonjayhawkins dec5be7
update pandas.core.ops.array_ops following #28431
simonjayhawkins a283913
check_untyped_defs core.indexes.datetimelike
simonjayhawkins bedda72
check_untyped_defs pandas.core.indexes.base
simonjayhawkins 931bd29
check_untyped_defs pandas.core.dtypes.cast
simonjayhawkins ca7a15f
check_untyped_defs pandas.core.resample
simonjayhawkins 2f38139
check_untyped_defs pandas.core.missing
simonjayhawkins 6f278d4
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 3cc93f0
check_untyped_defs pandas.core.internals.concat
simonjayhawkins 0a1f6d6
check_untyped_defs pandas.core.groupby.ops
simonjayhawkins 874aa8c
check_untyped_defs pandas.core.groupby.groupby
simonjayhawkins 563a37d
check_untyped_defs pandas.core.computation.expressions
simonjayhawkins 67890ef
mypy-0.730
simonjayhawkins 32f1780
add error codes
simonjayhawkins f610ce3
resolve merge conflict
simonjayhawkins fad9ace
mypy fix-up following #28516
simonjayhawkins f229758
set platform=linux-64
simonjayhawkins 53260f6
check_untyped_defs pandas.core.computation.align
simonjayhawkins 298c472
check_untyped_defs pandas.core.algorithms
simonjayhawkins 6ea4eed
check_untyped_defs pandas.core.computation.expr (part)
simonjayhawkins d2bc6a4
check_untyped_defs pandas.core.tools.datetimes
simonjayhawkins 8298620
check_untyped_defs pandas.core.arrays.categorical closes #28669
simonjayhawkins a0fc495
check_untyped_defs pandas.core.indexes.multi
simonjayhawkins 1b28fc4
check_untyped_defs pandas.core.reshape.merge
simonjayhawkins d25291a
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins e99d51e
check_untyped_defs pandas.core.groupby.generic
simonjayhawkins 2dc1db1
check_untyped_defs pandas.core.arrays.interval
simonjayhawkins 0cec4e8
check_untyped_defs pandas.core.base
simonjayhawkins baef456
resolve conflicts
simonjayhawkins 2a507d0
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 9b147ce
fix mypy error introduced in #27949
simonjayhawkins e9a5f78
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 75b3c48
check_untyped_defs pandas.core.reshape.reshape
simonjayhawkins 56b62b6
resolve conflicts
simonjayhawkins 2054965
mypy fixup of pandas.core.groupby.generic
simonjayhawkins 99ce0e7
check_untyped_defs pandas.core.generic
simonjayhawkins 43fb342
check_untyped_defs pandas.core.indexes.datetimes
simonjayhawkins c00967c
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 537c458
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins bb457d8
silence error introduced in #28878
simonjayhawkins 6f738a7
set python_version=3.6
simonjayhawkins 34bf08c
revert silence F821 and remove mypy error codes
simonjayhawkins c762d73
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins f0429da
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 3ceb00b
resolve conflicts
simonjayhawkins c14ebe1
update setup.cfg for green mypy following #28914
simonjayhawkins c03f3ca
check_untyped_defs pandas.core.frame
simonjayhawkins ba683f0
resolve merge conflict
simonjayhawkins 58245b4
misc types for indexes.base
simonjayhawkins 6f15f3d
check_untyped_defs pandas.io.json._normalize
simonjayhawkins e347e29
check_untyped_defs pandas.io.excel._xlwt
simonjayhawkins cee7096
check_untyped_defs pandas.io.formats.excel
simonjayhawkins e2c0fbf
check_untyped_defs pandas.io.sas.sas7bdat
simonjayhawkins cd961b1
check_untyped_defs pandas.tseries.holiday
simonjayhawkins beb4961
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins a398d83
check_untyped_defs pandas.core.nanops
simonjayhawkins 9649b6b
core.nanops.nanmean typed values
simonjayhawkins 571b66f
resolve conflicts
simonjayhawkins 20193e7
mypy fixups
simonjayhawkins a2296a7
mypy 0.740
simonjayhawkins e90ba27
fix requirements-dev.txt
simonjayhawkins f12cf80
merge master
simonjayhawkins f51c234
update setup.cfg
simonjayhawkins d8a44df
update setup.cfg
simonjayhawkins 3edbae8
check_untyped_defs pandas.core.arrays.numpy_
simonjayhawkins 8557d65
resolve conflicts
simonjayhawkins 8a86dca
mypy fix-up
simonjayhawkins 991e90d
mypy fix-up
simonjayhawkins 49f8e2d
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins e652b05
check_untyped_defs pandas.core.arrays.period
simonjayhawkins 8ae4dc1
check_untyped_defs pandas.core.arrays.string_
simonjayhawkins 7a92802
check_untyped_defs pandas.core.frame
simonjayhawkins 0a93437
merge master
simonjayhawkins 450d106
check_untyped_defs pandas.core.groupby.ops
simonjayhawkins d880f4b
check_untyped_defs pandas.core.reshape.merge
simonjayhawkins f84c333
check_untyped_defs pandas.io.common
simonjayhawkins 6c8da32
check_untyped_defs pandas.io.formats.csvs
simonjayhawkins ce1a030
check_untyped_defs pandas.io.sas.sas7bdat
simonjayhawkins c4e7777
update comments in io.common.BytesZipFile.write
simonjayhawkins e24ea34
check_untyped_defs pandas.core.algorithms
simonjayhawkins 90adc12
check_untyped_defs pandas.core.indexes.numeric
simonjayhawkins c101bef
check_untyped_defs pandas.core.indexing
simonjayhawkins a428f55
check_untyped_defs pandas.core.indexes.multi
simonjayhawkins 5e445af
merge master
simonjayhawkins 6e5845e
check_untyped_defs pandas.io.excel._base
simonjayhawkins fec67cb
revert ExcelWriter.check_extension to classmethod
simonjayhawkins f6b291b
merge master
simonjayhawkins 521241c
isort
simonjayhawkins b679a3d
add gh issue number for abstract class attribute issue
simonjayhawkins 327c663
check_untyped_defs pandas.io.html
simonjayhawkins 38df86d
check_untyped_defs pandas.plotting._matplotlib.misc
simonjayhawkins 1618320
check_untyped_defs pandas.io.excel._xlsxwriter
simonjayhawkins c5ec26e
check_untyped_defs pandas.io.packers (part)
simonjayhawkins c30c44d
check_untyped_defs pandas._config.config
simonjayhawkins 10cb366
merge master
simonjayhawkins 370a447
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins d02fc1f
resolve conflicts
simonjayhawkins 2dc5ed5
fix-up mypy errors
simonjayhawkins cf4baf0
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 7dd9732
mypy fixup
simonjayhawkins 3d50dcc
post merge tidy
simonjayhawkins 2bb80fc
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 97f3b3e
mypy fixup
simonjayhawkins ed7e469
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins e6c5f5a
mypy fixup
simonjayhawkins 63d9ab2
remove unnecessary variable annotation
simonjayhawkins c13af90
add type variable for DataSplitter
simonjayhawkins 1b7261c
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins c17ce81
update whitelist
simonjayhawkins fd68269
update whitelist
simonjayhawkins cfc2ef7
ignore_errors tests.scalar.period.test_period
simonjayhawkins 9849163
ignore_errors tests.indexes.datetimes.test_tools
simonjayhawkins 229f793
re-enable warn_unused_ignores
simonjayhawkins 0edfb1d
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 68dedae
check_untyped_defs core.groupby.grouper (part)
simonjayhawkins 3783ea4
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins be06790
mypy fixup
simonjayhawkins 28410b6
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 20ab3ff
mypy fixup
simonjayhawkins 9697cfc
check_untyped_defs core.arrays.interval
simonjayhawkins 2956ceb
black pandas after black-19.3b0 upgrade
simonjayhawkins 0a32cfa
check_untyped_defs core.arrays.sparse.array (ignores added)
simonjayhawkins f8e9c87
add embedsignature cython directive
simonjayhawkins e802255
remove manually created stubs
simonjayhawkins 593f4dc
remove ignores from core.arrays.sparse.array
simonjayhawkins 074938c
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins f0bb7d4
mypy fixup
simonjayhawkins fc7f9a2
fix failing tests
simonjayhawkins 2cbe19b
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins a6a23da
mypy fixup
simonjayhawkins 16e4ae4
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins ffcd20d
mypy fixup
simonjayhawkins afb3a1b
remove truediv test
simonjayhawkins 241e612
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins c1a47b9
mypy fixup
simonjayhawkins c0b195c
py3.6 annotations
simonjayhawkins 02c603f
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 97fbd94
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 74fc1d4
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 3e3ee75
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 9ed7667
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 4897e27
revert to mypy 0.730 for now
simonjayhawkins cafa6f8
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 92387d2
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 90a2738
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 9d2c7a9
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins d47619b
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 5d55a25
remove variable annotations from pandas/core/arrays/numpy_.py
simonjayhawkins 88a8ae8
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 0ddf982
check_untyped_defs pandas.core.computation.ops
simonjayhawkins 36ddaf2
check_untyped_defs pandas.core.generic
simonjayhawkins 90ddb7b
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 610f225
mypy fixup
simonjayhawkins c125413
Revert "mypy fixup"
simonjayhawkins 85f7f62
mypy fixup
simonjayhawkins 990e759
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins eea9e77
mypy fixup
simonjayhawkins a255ff7
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins ddd8820
remove None return value
simonjayhawkins b3cf62f
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins a22a6ca
mypy fixup
simonjayhawkins 93f8b7c
black and isort
simonjayhawkins 320c94e
merge fixup
simonjayhawkins e43f259
merge fixup
simonjayhawkins c62293f
remove no_strict_equality
simonjayhawkins 7e551d9
astype_nansafe
simonjayhawkins 18356dc
remove allow_untyped_decorators
simonjayhawkins 404e363
various clean-ups
simonjayhawkins 3af3ea4
black fixup
simonjayhawkins 85b06e5
remove stub
simonjayhawkins a105f7a
add generic type parameter
simonjayhawkins 791ea4a
computation.expr
simonjayhawkins 23aae91
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins e47d6d9
mypy fixup
simonjayhawkins f2bec93
remove NoReturn
simonjayhawkins 310a7e7
fix error message
simonjayhawkins 8d11016
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 99c8e35
mypy fixup
simonjayhawkins acb19c5
remove cast
simonjayhawkins f617f20
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins c61da84
clean pandas/compat/chainmap.py
simonjayhawkins 75a48d3
clean pandas/compat/__init__.py
simonjayhawkins c760483
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins d09ffbd
mypy fixup
simonjayhawkins f3bea94
resolve conflicts
simonjayhawkins 99193cb
mypy fixup
simonjayhawkins afd35a2
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins b84afd0
mypy fixup
simonjayhawkins 4c53307
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins b477f26
merge fix-up
simonjayhawkins 6f14806
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins ab91e49
mypy fix-up
simonjayhawkins acafe48
various cleanups
simonjayhawkins 4bec8ee
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 7b5c347
mypy fix-up
simonjayhawkins d7130c0
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins b4b2af0
isort
simonjayhawkins 1af4c00
mypy fixup (exc. io.formats.style)
simonjayhawkins febebe0
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins cc89f58
mypy fixup
simonjayhawkins 8361e4f
black pandas
simonjayhawkins cae3772
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 5fa2d6b
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 4c054bf
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins fb40422
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins a27130a
ignore mypy errors in holiday.py for now
simonjayhawkins b0a46f3
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins da88053
mypy fixup
simonjayhawkins 213d818
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 3e2007e
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 2297a1d
Merge branch 'typing' of github.com:simonjayhawkins/pandas into typing
simonjayhawkins 871dbc1
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 5d1e463
Merge branch 'typing' of github.com:simonjayhawkins/pandas into typing
simonjayhawkins 7cd52df
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 120f006
mypy fixup
simonjayhawkins 1eed055
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins a51d3fd
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins e10eeb3
mypy fixup
simonjayhawkins 30b0717
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins 52a35e1
mypy fixup
simonjayhawkins 61c2131
update setup.cfg
simonjayhawkins 6d72afa
Merge remote-tracking branch 'upstream/master' into typing
simonjayhawkins e862bf8
whitespace
simonjayhawkins 77dc092
fix test_partial_string_timestamp_multiindex
simonjayhawkins 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
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
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
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.
cc @jbrockmendel
if this path was tested (and reachable) it would have raised
__init__() missing 1 required positional argument: 'is_local'
fix here is to make
is_local
optional keyword.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.
Thanks for checking this out. Does this merit a separate PR?
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.
will do.
on master mypy --check-untyped-defs (with mypy 0.720) reports 372 errors. 304 of these still need to be investigated!
so not yet in a position to be able to prioritize fixes.
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.
Also, there was another recent case where there was an un-tested exception we were calling incorrectly. Will typing prevent that?
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.
with check-untyped-defs set (and the relevant module not blacklisted) then in theory, yes.
otherwise, if any type annotations are added to the calling function/method then the body of the function will be checked, so should also report errors.
so check-untyped-defs can serve two purposes, checking functions while still in the process of add type annotations and also checking new functions added without type annotations.
the second scenario would be unnecessary if we used disallow-untyped-defs. That's along way off though.