friendly-traceback / friendly

Friendly-traceback's version used in most situations
https://friendly-traceback.github.io/docs/index.html
MIT License
40 stars 5 forks source link

Improve handling of misused type hints in the console #35

Closed aroberge closed 2 years ago

aroberge commented 2 years ago

Using : instead of = results in adding a type hint instead of assigning a value. With recent improvements to friendly-traceback, this is handled reasonably well in a regular interactive session as shown below from friendly_idle:

image

Using the friendly console, a warning is displayed, but the information about the type hint is removed, and is no longer available when an exception is raised image

Improvements:

aroberge commented 2 years ago

Here's the result: image

aroberge commented 2 years ago

Reopening this issue as it keeps issuing warnings if type hints have been added to a builtin.