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

Switch from toml to tomli for TOML v1 support #10824

Merged
merged 1 commit into from
Jul 17, 2021
Merged

Switch from toml to tomli for TOML v1 support #10824

merged 1 commit into from
Jul 17, 2021

Conversation

hukkin
Copy link
Contributor

@hukkin hukkin commented Jul 14, 2021

Description

There wasn't an issue about this so not sure if this PR is welcome. It was a quick drive-by to make, however, so opened it anyways as a discussion starter. 😄

This switches TOML parser from toml (TOML v0.5 compatible) to tomli (TOML v1 compatible) with the idea that it's nice if mypy is able to read pyproject.toml even if it contains newer TOML syntax. Even if mypy doesn't need that syntax, pyproject.toml is shared by many other tools (often company internal ones that we don't know about) so would be great to not block them.

A couple other projects also made the switch recently.

@@ -1,15 +1,14 @@
import argparse
from collections import OrderedDict
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the discussion in #10219 it seemed like OrderedDict was only needed by Python 3.5 which is no longer supported, so guessing we don't need it anymore?

with open(metadata_fnam, 'r') as f:
metadata = toml.load(f)
import tomli
with open(metadata_fnam, 'r', encoding="utf-8") as f:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TOML spec requires UTF-8, so added the encoding kwarg

@JelleZijlstra
Copy link
Member

I agree we should do this and I can take care of reviewing and merging this PR.

Thanks for your contribution!

@JelleZijlstra JelleZijlstra self-assigned this Jul 14, 2021
@github-actions
Copy link
Contributor

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

werkzeug (https://github.com/pallets/werkzeug.git)
- tests/test_wsgi.py:474: error: Function is missing a type annotation
+ tests/test_wsgi.py:474: error: Function is missing a return type annotation
- tests/test_wrappers.py:285: error: Function is missing a type annotation
+ tests/test_wrappers.py:285: error: Function is missing a return type annotation

ibis (https://github.com/ibis-project/ibis.git)
- version: 0.920+dev.3bef7b82345bf9c7843e9fd78fd6e7b8408fdb34
+ version: 0.920+dev.5da75b1ca183eb5faaff68949fff23e4a25fb2f4
-   File "/tmp/mypy_primer/old_mypy/venv/bin/mypy", line 8, in <module>
+   File "/tmp/mypy_primer/new_mypy/venv/bin/mypy", line 8, in <module>
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/__main__.py", line 11, in console_entry
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/__main__.py", line 11, in console_entry
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/main.py", line 87, in main
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/main.py", line 87, in main
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/main.py", line 165, in run_build
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/main.py", line 165, in run_build
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 179, in build
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 179, in build
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 254, in _build
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 254, in _build
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 2698, in dispatch
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 2698, in dispatch
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 3022, in process_graph
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 3022, in process_graph
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 3120, in process_stale_scc
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 3120, in process_stale_scc
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 2166, in type_check_first_pass
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/build.py", line 2166, in type_check_first_pass
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/checker.py", line 295, in check_first_pass
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/checker.py", line 295, in check_first_pass
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/checker.py", line 402, in accept
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/checker.py", line 402, in accept
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/nodes.py", line 785, in accept
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/nodes.py", line 783, in accept
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/checker.py", line 3640, in visit_decorator
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/checker.py", line 3640, in visit_decorator
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/checkexpr.py", line 951, in check_call
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/checkexpr.py", line 944, in check_call
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/checkexpr.py", line 932, in check_call
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/checkexpr.py", line 925, in check_call
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/checkexpr.py", line 1044, in check_callable_call
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/checkexpr.py", line 1037, in check_callable_call
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/checkexpr.py", line 752, in apply_function_plugin
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/checkexpr.py", line 745, in apply_function_plugin
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/plugins/singledispatch.py", line 192, in call_singledispatch_function_after_register_argument
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/plugins/singledispatch.py", line 192, in call_singledispatch_function_after_register_argument
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/plugins/singledispatch.py", line 159, in register_function
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/plugins/singledispatch.py", line 159, in register_function
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.8/site-packages/mypy/plugins/singledispatch.py", line 33, in get_singledispatch_info
+   File "/tmp/mypy_primer/new_mypy/venv/lib/python3.8/site-packages/mypy/plugins/singledispatch.py", line 33, in get_singledispatch_info

sympy (https://github.com/sympy/sympy.git)
- sympy/logic/boolalg.py:69: error: Incompatible types in assignment (expression has type "_BooleanKind", base class "Basic" defined the type as "_UndefinedKind")
- sympy/core/numbers.py:591: error: Incompatible types in assignment (expression has type "_NumberKind", base class "Basic" defined the type as "_UndefinedKind")
- sympy/core/numbers.py:2509: error: Incompatible types in assignment (expression has type "_NumberKind", base class "Basic" defined the type as "_UndefinedKind")
- sympy/core/numbers.py:2514: error: Need type annotation for "free_symbols" (hint: "free_symbols: Set[<type>] = ...")
- sympy/core/numbers.py:3390: error: Incompatible types in assignment (expression has type "_NumberKind", base class "Basic" defined the type as "_UndefinedKind")
- sympy/core/numbers.py:3445: error: Incompatible types in assignment (expression has type "_NumberKind", base class "Basic" defined the type as "_UndefinedKind")
- sympy/core/numbers.py:4016: error: Incompatible types in assignment (expression has type "_NumberKind", base class "Basic" defined the type as "_UndefinedKind")
- sympy/core/mod.py:35: error: Incompatible types in assignment (expression has type "_NumberKind", base class "Basic" defined the type as "_UndefinedKind")
- sympy/tensor/array/sparse_ndim_array.py:101: error: Definition of "kind" in base class "NDimArray" is incompatible with definition in base class "Basic"
- sympy/tensor/array/ndim_array.py:582: error: Definition of "kind" in base class "NDimArray" is incompatible with definition in base class "Basic"
- sympy/tensor/array/dense_ndim_array.py:122: error: Definition of "kind" in base class "NDimArray" is incompatible with definition in base class "Basic"
- sympy/solvers/ode/single.py:1632: error: Module not callable
- sympy/solvers/ode/single.py:1947: error: "Dummy" has no attribute "name"
- sympy/matrices/expressions/matmul.py:19: error: Cannot determine type of "kind" in base class "MatrixExpr"
- sympy/matrices/expressions/matexpr.py:79: error: Incompatible types in assignment (expression has type "MatrixKind", base class "Basic" defined the type as "_UndefinedKind")
- sympy/matrices/expressions/matadd.py:17: error: Cannot determine type of "kind" in base class "MatrixExpr"
- sympy/abc.py:96: error: Need type annotation for "_clash1" (hint: "_clash1: Dict[<type>, <type>] = ...")
- sympy/abc.py:97: error: Need type annotation for "_clash2" (hint: "_clash2: Dict[<type>, <type>] = ...")
+ sympy/assumptions/sathandlers.py:217: error: Name "_" already defined on line 204
+ sympy/assumptions/sathandlers.py:227: error: Name "_" already defined on line 204
+ sympy/assumptions/sathandlers.py:236: error: Name "_" already defined on line 204
+ sympy/assumptions/sathandlers.py:247: error: Name "_" already defined on line 204
+ sympy/assumptions/sathandlers.py:256: error: Name "_" already defined on line 204
+ sympy/assumptions/sathandlers.py:263: error: Name "_" already defined on line 204
+ sympy/assumptions/sathandlers.py:269: error: Name "_" already defined on line 204
+ sympy/assumptions/sathandlers.py:281: error: Name "_" already defined on line 204
+ sympy/assumptions/sathandlers.py:290: error: Name "_" already defined on line 204
- sympy/assumptions/relation/equality.py:52: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:53: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:96: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:97: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:140: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:141: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:188: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:189: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:236: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:237: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:284: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
- sympy/assumptions/relation/equality.py:285: error: Incompatible types in assignment (expression has type "bool", base class "BinaryRelation" defined the type as "None")
+ sympy/assumptions/handlers/order.py:48: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:55: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:79: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:95: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:119: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:123: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:132: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:141: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:151: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:158: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:170: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:176: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:185: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:189: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:193: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:200: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:207: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:212: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:220: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:227: error: Name "_" already defined on line 43
+ sympy/assumptions/handlers/order.py:265: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:270: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:284: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:304: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:325: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:333: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:343: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:349: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:353: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:357: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:362: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:367: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:373: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:377: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:385: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:391: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:395: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:402: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:409: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:416: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:425: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/order.py:434: error: Name "_" already defined on line 258
+ sympy/assumptions/handlers/ntheory.py:41: error: Name "_" already defined on line 34
+ sympy/assumptions/handlers/ntheory.py:46: error: Name "_" already defined on line 34
+ sympy/assumptions/handlers/ntheory.py:57: error: Name "_" already defined on line 34
+ sympy/assumptions/handlers/ntheory.py:68: error: Name "_" already defined on line 34
+ sympy/assumptions/handlers/ntheory.py:72: error: Name "_" already defined on line 34
+ sympy/assumptions/handlers/ntheory.py:76: error: Name "_" already defined on line 34
+ sympy/assumptions/handlers/ntheory.py:80: error: Name "_" already defined on line 34
+ sympy/assumptions/handlers/ntheory.py:84: error: Name "_" already defined on line 34
+ sympy/assumptions/handlers/ntheory.py:91: error: Name "_" already defined on line 34
+ sympy/assumptions/handlers/ntheory.py:98: error: Name "_" already defined on line 34
+ sympy/assumptions/handlers/ntheory.py:139: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:144: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:185: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:206: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:218: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:222: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:226: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:230: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:235: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:240: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:245: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:252: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/ntheory.py:259: error: Name "_" already defined on line 132
+ sympy/assumptions/handlers/common.py:62: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:69: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:73: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:80: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:84: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:88: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:92: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:96: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:108: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:119: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:130: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/common.py:135: error: Name "_" already defined on line 50
+ sympy/assumptions/handlers/calculus.py:31: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:113: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:168: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:200: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:204: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:212: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:217: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:221: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:229: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:237: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:242: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:250: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/calculus.py:255: error: Name "_" already defined on line 20
+ sympy/assumptions/handlers/sets.py:42: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:47: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:54: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:65: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:93: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:97: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:104: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:108: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:112: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:117: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:124: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:136: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:155: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:161: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:167: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:173: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:182: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:189: error: Name "_" already defined on line 38
+ sympy/assumptions/handlers/sets.py:217: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:221: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:228: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:238: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:258: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:322: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:327: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:333: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:337: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:344: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:353: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:357: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:364: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:370: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:380: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:405: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:421: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:427: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:433: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:451: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:456: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:460: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:467: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:471: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:477: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:481: error: Name "_" already defined on line 212
+ sympy/assumptions/handlers/sets.py:497: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)
- sympy/utilities/matchpy_connector.py:101: error: Name "Wildcard" already defined (possibly by an import)
- sympy/utilities/matchpy_connector.py:148: error: Incompatible types in assignment (expression has type "int", base class "_WildAbstract" defined the type as "None")
- sympy/utilities/matchpy_connector.py:149: error: Incompatible types in assignment (expression has type "bool", base class "_WildAbstract" defined the type as "None")
- sympy/utilities/matchpy_connector.py:154: error: Incompatible types in assignment (expression has type "int", base class "_WildAbstract" defined the type as "None")
- sympy/utilities/matchpy_connector.py:155: error: Incompatible types in assignment (expression has type "bool", base class "_WildAbstract" defined the type as "None")
- sympy/utilities/matchpy_connector.py:160: error: Incompatible types in assignment (expression has type "int", base class "_WildAbstract" defined the type as "None")
- sympy/utilities/matchpy_connector.py:161: error: Incompatible types in assignment (expression has type "bool", base class "_WildAbstract" defined the type as "None")
- sympy/tensor/array/expressions/conv_matrix_to_array.py:40: error: "Basic" has no attribute "shape"
- sympy/tensor/array/expressions/conv_matrix_to_array.py:53: error: Argument 1 to "convert_matrix_to_array" has incompatible type "Basic"; expected "MatrixExpr"
- sympy/stats/frv_types.py:684: error: Decorated property not supported
- sympy/stats/stochastic_process_types.py:86: error: Incompatible types in assignment (expression has type "sympy.core.containers.Tuple", variable has type "Sequence[Any]")
- sympy/stats/stochastic_process_types.py:92: error: Incompatible types in assignment (expression has type "sympy.core.containers.Tuple", variable has type "Sequence[Any]")
- sympy/stats/stochastic_process_types.py:98: error: Incompatible types in assignment (expression has type "sympy.core.containers.Tuple", variable has type "Sequence[Any]")
- sympy/stats/stochastic_process_types.py:912: error: The erased type of self "sympy.core.basic.Basic" is not a supertype of its class "Type[sympy.stats.stochastic_process_types.DiscreteMarkovChain]"
- sympy/stats/stochastic_process_types.py:918: error: Argument 1 to "__new__" has incompatible type "Basic"; expected "Type[Basic]"
- sympy/stats/stochastic_process_types.py:1027: error: Need type annotation for "non_tree_edge_values" (hint: "non_tree_edge_values: Set[<type>] = ...")
- sympy/stats/stochastic_process_types.py:1224: error: Slice index must be an integer or None
- sympy/stats/stochastic_process_types.py:1334: error: "DiscreteMarkovChain" has no attribute "index_of"
- sympy/stats/sampling/sample_scipy.py:17: error: Name "scipy" already defined on line 15
- sympy/external/tests/test_pythonmpq.py:22: error: Argument 1 to "append" of "list" has incompatible type "Tuple[Any, Type[Any], Any, Type[Any]]"; expected "Tuple[Type[PythonMPQ], Type[PythonMPQ], Type[int], Type[int]]"
- sympy/unify/tests/test_unify.py:4: error: Unpacking a string is disallowed
- sympy/physics/mechanics/tests/test_joint.py:8: error: "Callable[[Any, Any, KwArg(Any)], Any]" has no attribute "_t"
- sympy/parsing/autolev/test-examples/ruletest9.py:44: error: Incompatible types in assignment (expression has type "MutableDenseMatrix", variable has type Module)
- sympy/parsing/autolev/test-examples/ruletest9.py:45: error: Unsupported target for indexed assignment (Module)
- sympy/parsing/autolev/test-examples/ruletest9.py:46: error: Module has no attribute "row_insert"
- sympy/parsing/autolev/test-examples/ruletest9.py:46: error: Module has no attribute "shape"
- sympy/parsing/autolev/test-examples/ruletest9.py:47: error: Unsupported target for indexed assignment (Module)
- sympy/parsing/autolev/test-examples/ruletest9.py:47: error: Module has no attribute "shape"
- sympy/parsing/autolev/test-examples/ruletest9.py:48: error: Value of type Module is not indexable
- sympy/parsing/autolev/test-examples/ruletest9.py:50: error: Unsupported target for indexed assignment (Module)
- sympy/parsing/autolev/test-examples/ruletest9.py:51: error: Value of type Module is not indexable
- sympy/parsing/autolev/test-examples/ruletest7.py:35: error: Value of type Module is not indexable
- sympy/parsing/autolev/test-examples/ruletest6.py:25: error: Module has no attribute "T"
- sympy/parsing/autolev/test-examples/ruletest6.py:26: error: Module has no attribute "eigenvals"
- sympy/parsing/autolev/test-examples/ruletest6.py:31: error: Value of type Module is not indexable
- sympy/parsing/autolev/test-examples/ruletest6.py:32: error: Module has no attribute "cols"; maybe "cos"?
- sympy/parsing/autolev/test-examples/ruletest6.py:33: error: Module has no attribute "col"
- sympy/parsing/autolev/test-examples/ruletest6.py:34: error: Module has no attribute "T"
- sympy/parsing/autolev/test-examples/ruletest6.py:35: error: Module has no attribute "row"
- sympy/parsing/autolev/test-examples/ruletest6.py:36: error: Module has no attribute "row"
- sympy/parsing/autolev/test-examples/ruletest4.py:16: error: "Callable[[Any, Any, KwArg(Any)], Any]" has no attribute "_t"
- sympy/parsing/autolev/test-examples/ruletest2.py:8: error: "Callable[[Any, Any, KwArg(Any)], Any]" has no attribute "_t"
- sympy/parsing/autolev/test-examples/ruletest12.py:13: error: "MutableDenseMatrix" has no attribute "__iter__" (not iterable)
- sympy/parsing/autolev/test-examples/ruletest11.py:13: error: "MutableDenseMatrix" has no attribute "__iter__" (not iterable)
- sympy/parsing/autolev/test-examples/ruletest10.py:11: error: Module has no attribute "__iter__" (not iterable)
- sympy/parsing/autolev/test-examples/ruletest10.py:11: error: Module has no attribute "shape"
- sympy/parsing/autolev/test-examples/ruletest10.py:13: error: Module has no attribute "__iter__" (not iterable)
- sympy/parsing/autolev/test-examples/ruletest10.py:13: error: Module has no attribute "shape"
- sympy/parsing/autolev/test-examples/ruletest10.py:24: error: Module has no attribute "__iter__" (not iterable)
- sympy/parsing/autolev/test-examples/ruletest10.py:24: error: Module has no attribute "shape"
- sympy/parsing/autolev/test-examples/pydy-example-repo/non_min_pendulum.py:24: error: "MutableDenseMatrix" has no attribute "__iter__" (not iterable)
- sympy/parsing/autolev/test-examples/pydy-example-repo/mass_spring_damper.py:10: error: "Callable[[Any, Any, KwArg(Any)], Any]" has no attribute "_t"

@JelleZijlstra JelleZijlstra merged commit aede3ae into python:master Jul 17, 2021
@hukkin hukkin deleted the toml-v1-support branch July 17, 2021 06:57
sthagen added a commit to sthagen/python-mypy that referenced this pull request Jul 17, 2021
Switch from `toml` to `tomli` for TOML v1 support (python#10824)
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.

2 participants