Title: Real error location not shown · Issue #107 · skogsbaer/write-your-python-program · GitHub
Open Graph Title: Real error location not shown · Issue #107 · skogsbaer/write-your-python-program
X Title: Real error location not shown · Issue #107 · skogsbaer/write-your-python-program
Description: Here is testcase test-data/testTypesDict4.py: from wypp import * def foo(d: dict[str, Callable[[], str]]) -> list[str]: d['x'] = lambda: 'x' # ok res = [] for k, f in d.items(): res.append(f()) return res def bar(d: dict[str, Callable[[]...
Open Graph Description: Here is testcase test-data/testTypesDict4.py: from wypp import * def foo(d: dict[str, Callable[[], str]]) -> list[str]: d['x'] = lambda: 'x' # ok res = [] for k, f in d.items(): res.append(f()) ret...
X Description: Here is testcase test-data/testTypesDict4.py: from wypp import * def foo(d: dict[str, Callable[[], str]]) -> list[str]: d['x'] = lambda: 'x' # ok res = [] for k, f in d.items(): ...
Opengraph URL: https://github.com/skogsbaer/write-your-python-program/issues/107
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Real error location not shown","articleBody":"Here is testcase `test-data/testTypesDict4.py`:\r\n```python\r\nfrom wypp import *\r\n\r\ndef foo(d: dict[str, Callable[[], str]]) -> list[str]:\r\n d['x'] = lambda: 'x' # ok\r\n res = []\r\n for k, f in d.items():\r\n res.append(f())\r\n return res\r\n\r\ndef bar(d: dict[str, Callable[[], str]]) -> list[str]:\r\n return foo(d)\r\n\r\nfunc = lambda: 42\r\nbar({'y': func}) # error\r\n```\r\n\r\nThe real error location is not shown. The output is:\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"test-data/testTypesDict4.py\", line 14, in \u003cmodule>\r\n bar({'y': func}) # error\r\n File \"test-data/testTypesDict4.py\", line 11, in bar\r\n return foo(d)\r\n File \"test-data/testTypesDict4.py\", line 7, in foo\r\n res.append(f())\r\nWyppTypeError: dict is not a dict[str, Callable[[], str]]\r\ngiven: {'y': \u003cfunction \u003clambda> at 0x10b94d090>, 'x': \u003cuntypy.impl.callable.TypedCallable object at 0x10b9a2dd0>}\r\nexpected: value of type dict[str, Callable[[], str]]\r\n\r\ncontext: foo(d: dict[str, Callable[[], str]]) -> list[str]\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\ndeclared at: test-data/testTypesDict4.py:3\r\ncaused by: test-data/testTypesDict4.py:11\r\n | return foo(d)\r\n```\r\n","author":{"url":"https://github.com/skogsbaer","@type":"Person","name":"skogsbaer"},"datePublished":"2022-05-09T09:26:00Z","url":"https://github.com/skogsbaer/write-your-python-program/issues/107"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:04ea155b-248c-9618-bb56-f671130de3e3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E8F0:3B9226:46296E:5E7F73:6B00A525 |
| html-safe-nonce | 2a3bcd5ae7d20708b3e48bf1b61d67cb8ba0a1c2e63f294ec3a954465cae24ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEYwOjNCOTIyNjo0NjI5NkU6NUU3RjczOjZCMDBBNTI1IiwidmlzaXRvcl9pZCI6IjQ3NTk5MzU4ODMxMTk5OTQxNDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | be330f0db5e589f541d4f652e4182c215367833e6aedef0b9f9316144c723ecf |
| hovercard-subject-tag | issue:1229430912 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/skogsbaer/write-your-python-program/107/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d15f646b75731537ad3eded83cc8dfe22341fd358910791cd38ea5244b89d9bc/skogsbaer/write-your-python-program/issues/107 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d15f646b75731537ad3eded83cc8dfe22341fd358910791cd38ea5244b89d9bc/skogsbaer/write-your-python-program/issues/107 |
| og:image:alt | Here is testcase test-data/testTypesDict4.py: from wypp import * def foo(d: dict[str, Callable[[], str]]) -> list[str]: d['x'] = lambda: 'x' # ok res = [] for k, f in d.items(): res.append(f()) ret... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | skogsbaer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 455b493e3402a3a3a06beac5d20bb7db3da060808b220aa48d6a7eca7c59863a |
| turbo-cache-control | no-preview |
| go-import | github.com/skogsbaer/write-your-python-program git https://github.com/skogsbaer/write-your-python-program.git |
| octolytics-dimension-user_id | 567524 |
| octolytics-dimension-user_login | skogsbaer |
| octolytics-dimension-repository_id | 295649345 |
| octolytics-dimension-repository_nwo | skogsbaer/write-your-python-program |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 295649345 |
| octolytics-dimension-repository_network_root_nwo | skogsbaer/write-your-python-program |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2f575159976167242d488c0b062eb355c4e198b7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width