gleitz / howdoi

instant coding answers via the command line
http://blog.gleitzman.com/post/43330157197/howdoi-instant-coding-answers-via-the-command-line
MIT License
10.56k stars 867 forks source link

update 2 places for int and str operations #491

Closed dizzygz closed 8 months ago

dizzygz commented 8 months ago

Description:

File "/home/dizzygz/myprog/python/howdoi/howdoi/howdoi.py", line 468, in _get_answer_worker
    multiple_answers = (args['num_answers'] > 1 or args['all'])
TypeError: '>' not supported between instances of 'str' and 'int'

File "/home/dizzygz/myprog/python/howdoi/howdoi/howdoi.py", line 437, in _get_answers
    final_pos = initial_pos + args['num_answers']
TypeError: unsupported operand type(s) for +: 'int' and 'str'

Pull Request type:

How to test:

Please provide detailed instructions for testing your changes locally, including expected response/behavior.

Pull Request checklist:

Known bugs (if any):

If there are bugs in your current changes you can still open the PR and mention the bugs you found. Propose further changes that can help fix bugs in your current changes.

gleitz commented 8 months ago

Nice! Thanks for the PR

gleitz commented 8 months ago

Getting a strange installation error in the CI. I wonder if lxml version needs to be bumped?

gleitz commented 8 months ago

turn out lxml 5.0.0 was broken – they have since released 5.0.1. Re-ran the jobs and everything looks good.