kunyavskiy / polygon-cli

Command-line tool for polygon
MIT License
58 stars 17 forks source link

polygon_name None is breaking #39

Closed bronsonrudner closed 3 years ago

bronsonrudner commented 3 years ago

If polygon_name is None (default) the snippet below does not retrieve the saved data, which is stored as 'null'. I fixed this by adding a line polygon_name = polygon_name or 'null'. https://github.com/kunyavskiy/polygon-cli/blob/37e6b9b4a20ce0fa6d6e16bdf784a22d1414598f/polygon_cli/config.py#L72

When polygon_name is None (default) the snippet below breaks. I propose using an fstring rather than addition. https://github.com/kunyavskiy/polygon-cli/blob/37e6b9b4a20ce0fa6d6e16bdf784a22d1414598f/polygon_cli/config.py#L81

kunyavskiy commented 3 years ago

Well, it was not supposed to be None. Anyway, I don't think there is any reasonable interpretation of None at this point. I added default values to arg-parser, probably it would fix your problem. I definitely need to add some tests to avoid thinks like that, Sorry :)