forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 0
Test disallow str iteration against mypy primer #1
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
Open
michaelm-openai
wants to merge
11
commits into
master
Choose a base branch
from
test_disallow_str_iteration_against_mypy_primer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Test disallow str iteration against mypy primer #1
michaelm-openai
wants to merge
11
commits into
master
from
test_disallow_str_iteration_against_mypy_primer
Conversation
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 comment has been minimized.
This comment has been minimized.
1cbfef1 to
64f10a2
Compare
This comment has been minimized.
This comment has been minimized.
64f10a2 to
584457a
Compare
This comment has been minimized.
This comment has been minimized.
31c2b98 to
444e359
Compare
584457a to
b68427b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
444e359 to
b0f3092
Compare
955ee06 to
a2252a2
Compare
This comment has been minimized.
This comment has been minimized.
a2252a2 to
2264006
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1dfa9da to
f925578
Compare
This comment has been minimized.
This comment has been minimized.
818c95f to
b4d9fd6
Compare
This comment has been minimized.
This comment has been minimized.
b0f3092 to
3cae656
Compare
f590891 to
b4d9fd6
Compare
This comment has been minimized.
This comment has been minimized.
4f028a0 to
af07104
Compare
902042e to
d585f55
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
d585f55 to
bc378d4
Compare
|
Diff from mypy_primer, showing the effect of this PR on open source code: optuna (https://github.com/optuna/optuna)
+ tests/samplers_tests/test_grid.py:52: error: Non-overlapping equality check (left operand type: "set[tuple[str | float | int | None, ...]]", right operand type: "set[tuple[Sequence[str | float | int | bool | None], ...]]") [comparison-overlap]
zulip (https://github.com/zulip/zulip)
+ zerver/tests/test_invite.py:239: error: Need type annotation for "payload" [var-annotated]
scrapy (https://github.com/scrapy/scrapy)
- scrapy/http/request/form.py:109: error: Redundant cast to "Iterable[str]" [redundant-cast]
cki-lib (https://gitlab.com/cki-project/cki-lib)
- tests/kcidb/test_validate.py:348: error: Value of type "Collection[Collection[str]]" is not indexable [index]
+ tests/kcidb/test_validate.py:348: error: Value of type "Collection[object]" is not indexable [index]
- tests/kcidb/test_validate.py:384: error: Value of type "Collection[Collection[str]]" is not indexable [index]
+ tests/kcidb/test_validate.py:384: error: Value of type "Collection[object]" is not indexable [index]
- tests/kcidb/test_validate.py:398: error: Value of type "Collection[Collection[str]]" is not indexable [index]
+ tests/kcidb/test_validate.py:398: error: Value of type "Collection[object]" is not indexable [index]
core (https://github.com/home-assistant/core)
+ homeassistant/helpers/template/extensions/collection.py:92: error: Subclass of "Iterable[Any]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
+ homeassistant/helpers/template/extensions/collection.py:133: error: Subclass of "Iterable[Any]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
+ homeassistant/helpers/template/extensions/collection.py:135: error: Subclass of "Iterable[Any]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
+ homeassistant/helpers/template/extensions/collection.py:142: error: Subclass of "Iterable[Any]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
+ homeassistant/helpers/template/extensions/collection.py:144: error: Subclass of "Iterable[Any]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
+ homeassistant/helpers/template/extensions/collection.py:151: error: Subclass of "Iterable[Any]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
+ homeassistant/helpers/template/extensions/collection.py:153: error: Subclass of "Iterable[Any]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
+ homeassistant/helpers/template/extensions/collection.py:162: error: Subclass of "Iterable[Any]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
+ homeassistant/helpers/template/extensions/collection.py:166: error: Subclass of "Iterable[Any]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
+ homeassistant/components/reolink/util.py:73: error: Type argument "str" of "Store" must be a subtype of "Mapping[str, Any] | Sequence[Any]" [type-var]
+ homeassistant/components/reolink/util.py:75: error: Value of type variable "_T" of "Store" cannot be "str" [type-var]
+ homeassistant/components/reolink/host.py:183: error: Type argument "str" of "Store" must be a subtype of "Mapping[str, Any] | Sequence[Any]" [type-var]
+ homeassistant/components/met_eireann/weather.py:39: error: Unsupported right operand type for in ("object") [operator]
urllib3 (https://github.com/urllib3/urllib3)
- src/urllib3/_collections.py:359: error: Redundant cast to "Iterable[tuple[str, str]]" [redundant-cast]
pandas (https://github.com/pandas-dev/pandas)
+ pandas/io/formats/style_render.py:377: error: "object" has no attribute "extend" [attr-defined]
+ pandas/io/formats/style_render.py:378: error: "object" has no attribute "extend" [attr-defined]
+ pandas/io/formats/style_render.py:379: error: "object" has no attribute "extend" [attr-defined]
+ pandas/tests/test_sorting.py:358: error: Value of type variable "_ScalarT" of "array" cannot be "object" [type-var]
+ pandas/tests/test_sorting.py:359: error: Value of type variable "_ScalarT" of "array" cannot be "object" [type-var]
+ pandas/tests/indexes/interval/test_constructors.py:150: error: Value of type variable "_ScalarT" of "array" cannot be "object" [type-var]
ibis (https://github.com/ibis-project/ibis)
- ibis/expr/types/strings.py:958: error: Need type annotation for "pattern" [var-annotated]
- ibis/expr/types/strings.py:1002: error: Need type annotation for "pattern" [var-annotated]
black (https://github.com/psf/black)
+ src/blib2to3/pytree.py:660:35: error: Subclass of "Iterable[str]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_plotting.py:546: error: Expression is of type "Any", not "Axes" [assert-type]
+ tests/series/test_series.py:2467: error: Expression is of type "Any | None", not "str | None" [assert-type]
+ tests/series/test_series.py:2468: error: Expression is of type "Any | None", not "str | None" [assert-type]
+ tests/series/test_series.py:2469: error: Expression is of type "Any | None", not "str | None" [assert-type]
+ tests/series/test_series.py:2470: error: Expression is of type "Any | None", not "str | None" [assert-type]
+ tests/series/test_series.py:2471: error: Expression is of type "Any", not "str" [assert-type]
+ tests/series/test_series.py:2472: error: Expression is of type "Any", not "str | bool" [assert-type]
apprise (https://github.com/caronc/apprise)
- apprise/apprise.py:850: error: "Collection[str]" has no attribute "append" [attr-defined]
+ apprise/apprise.py:850: error: "object" has no attribute "append" [attr-defined]
materialize (https://github.com/MaterializeInc/materialize)
- misc/python/materialize/cli/orchestratord.py:312: error: Unsupported target for indexed assignment ("Collection[str]") [index]
+ misc/python/materialize/cli/orchestratord.py:312: error: Unsupported target for indexed assignment ("object") [index]
- misc/python/materialize/cli/orchestratord.py:315: error: Unsupported target for indexed assignment ("Collection[str]") [index]
+ misc/python/materialize/cli/orchestratord.py:315: error: Unsupported target for indexed assignment ("object") [index]
mkdocs (https://github.com/mkdocs/mkdocs)
+ mkdocs/config/config_options.py:371: error: Subclass of "Collection[T]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
rotki (https://github.com/rotki/rotki)
+ rotkehlchen/chain/arbitrum_one/modules/gmx/balances.py:140: error: Value of type "object" is not indexable [index]
+ rotkehlchen/chain/arbitrum_one/modules/gmx/balances.py:147: error: Value of type "object" is not indexable [index]
static-frame (https://github.com/static-frame/static-frame)
+ static_frame/core/type_blocks.py:408: error: Subclass of "Sequence[Any]" and "str" cannot exist: would have inconsistent method resolution order [unreachable]
cloud-init (https://github.com/canonical/cloud-init)
- tests/unittests/sources/test_lxd.py:325: error: Statement is unreachable [unreachable]
xarray (https://github.com/pydata/xarray)
+ xarray/namedarray/utils.py:181: error: "yield from" can't be applied to "str | Iterable[Hashable]" [misc]
nox (https://github.com/wntrblm/nox)
+ nox/_option_set.py:52: error: Value of type variable "_I" of "deep_iterable" cannot be "str" [type-var]``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.