SMAT-Lab / Scalpel

Scalpel: The Python Static Analysis Framework
Apache License 2.0
286 stars 43 forks source link

Fix TypeErrors #46

Closed tristanlatr closed 2 years ago

tristanlatr commented 2 years ago

Raising a string is not a thing in Python, these lines will trigger a TypeError.

by default 2022-06-07 at 9 37 52 PM

Notice the difference:

>>> raise ValueError()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError
>>> raise 'ValueError'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: exceptions must derive from BaseException

Running pytype on this project to fix the obvious TypeErrors would be a good thing until you develop your own type checker ;)

Jarvx commented 2 years ago

Thanks for your kind help! Will fix soon!

Jarvx commented 2 years ago

The issue has been fixed now.