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

helpful-string improvements #603

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

helpful-string improvements #603

wants to merge 2 commits into from

Conversation

KotlinIsland
Copy link
Owner

No description provided.

Copy link

github-actions bot commented Jan 4, 2024

Diff from mypy_primer, showing the effect of this PR on open source code:

scikit-learn (https://github.com/scikit-learn/scikit-learn)
- sklearn/neighbors/tests/test_neighbors.py:82:5: error: Expression type contains "Any" (has type "set[str | Any (from unimported type)]")  [no-any-expr]
+ sklearn/neighbors/tests/test_neighbors.py:82:5: error: Expression type contains "Any" (has type "set[Any (from unimported type) | str]")  [no-any-expr]
- sklearn/neighbors/tests/test_neighbors.py:82:23: error: Expression type contains "Any" (has type "map[set[str | Any (from unimported type)]]")  [no-any-expr]
+ sklearn/neighbors/tests/test_neighbors.py:82:23: error: Expression type contains "Any" (has type "map[set[Any (from unimported type) | str]]")  [no-any-expr]
- sklearn/tree/tests/test_export.py:320:5: error: Expression type contains "Any" (has type "(Any (from unimported type), Any (from unimported type), DecisionTreeClassifier | DecisionTreeRegressor)")  [no-any-expr]
+ sklearn/tree/tests/test_export.py:320:5: error: Expression type contains "Any" (has type "(Any (from unimported type), Any (from unimported type), DecisionTreeRegressor | DecisionTreeClassifier)")  [no-any-expr]
- sklearn/tree/tests/test_export.py:320:22: error: Expression type contains "Any" (has type "zip[(Any (from unimported type), Any (from unimported type), DecisionTreeClassifier | DecisionTreeRegressor)]")  [no-any-expr]
+ sklearn/tree/tests/test_export.py:320:22: error: Expression type contains "Any" (has type "zip[(Any (from unimported type), Any (from unimported type), DecisionTreeRegressor | DecisionTreeClassifier)]")  [no-any-expr]

sympy (https://github.com/sympy/sympy)
- sympy/solvers/solvers.py:3630:38: error: Expression type contains "Any" (has type "dict[Any | Dummy, Any]")  [no-any-expr]
+ sympy/solvers/solvers.py:3630:38: error: Expression type contains "Any" (has type "dict[Dummy | Any, Any]")  [no-any-expr]
- sympy/solvers/solvers.py:3630:43: error: Expression type contains "Any" (has type "zip[(Any | Dummy, Any)]")  [no-any-expr]
+ sympy/solvers/solvers.py:3630:43: error: Expression type contains "Any" (has type "zip[(Dummy | Any, Any)]")  [no-any-expr]
- sympy/series/tests/test_limits.py:453:5: error: Expression type contains "Any" (has type "(int, (Any, Any (unannotated) | None | int))")  [no-any-expr]
+ sympy/series/tests/test_limits.py:453:5: error: Expression type contains "Any" (has type "(int, (Any, int | Any (unannotated) | None))")  [no-any-expr]
- sympy/series/tests/test_limits.py:453:5: error: Expression type contains "Any" (has type "(Any, Any (unannotated) | None | int)")  [no-any-expr]
+ sympy/series/tests/test_limits.py:453:5: error: Expression type contains "Any" (has type "(Any, int | Any (unannotated) | None)")  [no-any-expr]
- sympy/series/tests/test_limits.py:453:5: error: Expression type contains "Any" (has type "Any (unannotated) | None | int")  [no-any-expr]
+ sympy/series/tests/test_limits.py:453:5: error: Expression type contains "Any" (has type "int | Any (unannotated) | None")  [no-any-expr]
- sympy/series/tests/test_limits.py:453:27: error: Expression type contains "Any" (has type "enumerate[(Any, Any (unannotated) | None | int)]")  [no-any-expr]
+ sympy/series/tests/test_limits.py:453:27: error: Expression type contains "Any" (has type "enumerate[(Any, int | Any (unannotated) | None)]")  [no-any-expr]
- sympy/series/tests/test_limits.py:453:37: error: Expression type contains "Any" (has type "zip[(Any, Any (unannotated) | None | int)]")  [no-any-expr]
+ sympy/series/tests/test_limits.py:453:37: error: Expression type contains "Any" (has type "zip[(Any, int | Any (unannotated) | None)]")  [no-any-expr]
- sympy/series/tests/test_limits.py:457:20: error: Expression type contains "Any" (has type "Any (unannotated) | bool")  [no-any-expr]
+ sympy/series/tests/test_limits.py:457:20: error: Expression type contains "Any" (has type "bool | Any (unannotated)")  [no-any-expr]
- sympy/series/tests/test_limits.py:457:46: error: Expression type contains "Any" (has type "Any (unannotated) | None | int")  [no-any-expr]
+ sympy/series/tests/test_limits.py:457:46: error: Expression type contains "Any" (has type "int | Any (unannotated) | None")  [no-any-expr]
- sympy/series/tests/test_limits.py:489:5: error: Expression type contains "Any" (has type "(int, ((Any (from error), Any (unannotated) | float | None, str), Any (unannotated) | None | int))")  [no-any-expr]
+ sympy/series/tests/test_limits.py:489:5: error: Expression type contains "Any" (has type "(int, ((Any (from error), Any (unannotated) | float | None, str), int | Any (unannotated) | None))")  [no-any-expr]
- sympy/series/tests/test_limits.py:489:5: error: Expression type contains "Any" (has type "((Any (from error), Any (unannotated) | float | None, str), Any (unannotated) | None | int)")  [no-any-expr]
+ sympy/series/tests/test_limits.py:489:5: error: Expression type contains "Any" (has type "((Any (from error), Any (unannotated) | float | None, str), int | Any (unannotated) | None)")  [no-any-expr]
- sympy/series/tests/test_limits.py:489:5: error: Expression type contains "Any" (has type "Any (unannotated) | None | int")  [no-any-expr]
+ sympy/series/tests/test_limits.py:489:5: error: Expression type contains "Any" (has type "int | Any (unannotated) | None")  [no-any-expr]
- sympy/series/tests/test_limits.py:489:27: error: Expression type contains "Any" (has type "enumerate[((Any (from error), Any (unannotated) | float | None, str), Any (unannotated) | None | int)]")  [no-any-expr]
+ sympy/series/tests/test_limits.py:489:27: error: Expression type contains "Any" (has type "enumerate[((Any (from error), Any (unannotated) | float | None, str), int | Any (unannotated) | None)]")  [no-any-expr]
- sympy/series/tests/test_limits.py:489:37: error: Expression type contains "Any" (has type "zip[((Any (from error), Any (unannotated) | float | None, str), Any (unannotated) | None | int)]")  [no-any-expr]
+ sympy/series/tests/test_limits.py:489:37: error: Expression type contains "Any" (has type "zip[((Any (from error), Any (unannotated) | float | None, str), int | Any (unannotated) | None)]")  [no-any-expr]
- sympy/series/tests/test_limits.py:493:20: error: Expression type contains "Any" (has type "Any (unannotated) | bool")  [no-any-expr]
+ sympy/series/tests/test_limits.py:493:20: error: Expression type contains "Any" (has type "bool | Any (unannotated)")  [no-any-expr]
- sympy/series/tests/test_limits.py:493:46: error: Expression type contains "Any" (has type "Any (unannotated) | None | int")  [no-any-expr]
+ sympy/series/tests/test_limits.py:493:46: error: Expression type contains "Any" (has type "int | Any (unannotated) | None")  [no-any-expr]
- sympy/geometry/tests/test_point.py:389:9: error: Incompatible types in assignment (expression has type "(list[int] | (int, int) | Point, list[int] | (int, int) | Point)", variable has type "(int, int) | list[int] | Point")  [assignment]
+ sympy/geometry/tests/test_point.py:389:9: error: Incompatible types in assignment (expression has type "(Point | list[int] | (int, int), Point | list[int] | (int, int))", variable has type "(int, int) | list[int] | Point")  [assignment]

mkdocs (https://github.com/mkdocs/mkdocs)
- mkdocs/tests/config/config_tests.py:209:9: error: Expression type contains "Any" (has type "(dict[str, str] | dict[str, dict[str, str]] | dict[str, dict[str, None | Untyped]] | dict[str, dict[str, str | Untyped]] | dict[str, dict[str, str | list[str] | bool]], dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]])")  [no-any-expr]
+ mkdocs/tests/config/config_tests.py:209:9: error: Expression type contains "Any" (has type "(dict[str, str] | dict[str, dict[str, str]] | dict[str, dict[str, None | Untyped]] | dict[str, dict[str, str | Untyped]] | dict[str, dict[str, str | list[str] | bool]], dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]])")  [no-any-expr]
- mkdocs/tests/config/config_tests.py:209:9: error: Expression type contains "Any" (has type "dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]]")  [no-any-expr]
+ mkdocs/tests/config/config_tests.py:209:9: error: Expression type contains "Any" (has type "dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]]")  [no-any-expr]
- mkdocs/tests/config/config_tests.py:209:40: error: Expression type contains "Any" (has type "zip[(dict[str, str] | dict[str, dict[str, str]] | dict[str, dict[str, None | Untyped]] | dict[str, dict[str, str | Untyped]] | dict[str, dict[str, str | list[str] | bool]], dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]])]")  [no-any-expr]
+ mkdocs/tests/config/config_tests.py:209:40: error: Expression type contains "Any" (has type "zip[(dict[str, str] | dict[str, dict[str, str]] | dict[str, dict[str, None | Untyped]] | dict[str, dict[str, str | Untyped]] | dict[str, dict[str, str | list[str] | bool]], dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]])]")  [no-any-expr]
- mkdocs/tests/config/config_tests.py:216:54: error: Expression type contains "Any" (has type "dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]]")  [no-any-expr]
- mkdocs/tests/config/config_tests.py:216:54: error: Expression type contains "Any" (has type "list[Untyped | str] | list[str] | dict[str, None | Locale] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]")  [no-any-expr]
+ mkdocs/tests/config/config_tests.py:216:54: error: Expression type contains "Any" (has type "dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]]")  [no-any-expr]
+ mkdocs/tests/config/config_tests.py:216:54: error: Expression type contains "Any" (has type "list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None] | list[Untyped | str] | dict[str, None | Locale]")  [no-any-expr]
- mkdocs/tests/config/config_tests.py:217:70: error: Expression type contains "Any" (has type "dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]]")  [no-any-expr]
- mkdocs/tests/config/config_tests.py:217:70: error: Expression type contains "Any" (has type "list[Untyped | str] | list[str] | dict[str, None | Locale] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]")  [no-any-expr]
+ mkdocs/tests/config/config_tests.py:217:70: error: Expression type contains "Any" (has type "dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]]")  [no-any-expr]
+ mkdocs/tests/config/config_tests.py:217:70: error: Expression type contains "Any" (has type "list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None] | list[Untyped | str] | dict[str, None | Locale]")  [no-any-expr]
- mkdocs/tests/config/config_tests.py:218:55: error: Expression type contains "Any" (has type "dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]]")  [no-any-expr]
- mkdocs/tests/config/config_tests.py:218:55: error: Expression type contains "Any" (has type "list[Untyped | str] | list[str] | dict[str, None | Locale] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]")  [no-any-expr]
+ mkdocs/tests/config/config_tests.py:218:55: error: Expression type contains "Any" (has type "dict[str, list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]]] | dict[str, list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None]] | dict[str, list[Untyped | str] | list[str] | dict[str, None | Locale]]")  [no-any-expr]
+ mkdocs/tests/config/config_tests.py:218:55: error: Expression type contains "Any" (has type "list[str] | dict[str, str | Locale | bool | dict[str, None] | list[Any (from error)] | int | dict[str, int]] | dict[str, str | Locale | bool | dict[str, bool | None] | list[Any (from error)] | int | None] | list[Untyped | str] | dict[str, None | Locale]")  [no-any-expr]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant