CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.91k stars 236 forks source link

editor prompt: only call `issubclass` when the "validate" argument is a class #55

Closed piax93 closed 5 years ago

piax93 commented 5 years ago

For some reasons I don't really understand sometimes this causes an exception, sometimes it does not. Anyway, issubclass only access class objects as first argument so when the "validate" field is just defined as a function an error is raised. Using inspect to check that the passed value is actually a class should fix the issue (this was already employed in prompts/input.py).

CITGuru commented 5 years ago

@piax93 Thanks for the PR