Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update 2 places for int and str operations #491

Merged
merged 1 commit into from
Jan 6, 2024
Merged

Conversation

dizzygz
Copy link
Contributor

@dizzygz dizzygz commented Dec 28, 2023

Description:

  • Tasks solved
    Errors reported when run:
    howdoi --num-answers 2 python lambda function list comprehension
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'
  • Links to issues solved

Pull Request type:

  • Bug fixes
  • New feature
  • Improvement
  • Refactoring
  • Documentation update
  • Security fix

How to test:

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

Pull Request checklist:

  • Read the contributing_to_howdoi.md
  • Attach screenshots of expected behavior.
  • The changes pass tests locally (nose2).
  • There are no linting errors (python setup.py lint).
  • The changes don't break existing features.
  • Check that there are no confidential files like .env included.
  • Request review from the maintainers.
  • For bug fixes or changes to directory structure, make sure docs are updated.

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
Copy link
Owner

gleitz commented Dec 30, 2023

Nice! Thanks for the PR

@gleitz
Copy link
Owner

gleitz commented Dec 30, 2023

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

@gleitz
Copy link
Owner

gleitz commented Jan 6, 2024

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

@gleitz gleitz merged commit 6f8813d into gleitz:master Jan 6, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants