Coffee-fueled-deadlines / OSRSBytes

OSRSBytes is an all-in-one Python library for Old School Runescape (OSRS) that features Item Information Lookup, OSRS Hiscores, and Grand Exchange Market information.
Eclipse Public License 2.0
49 stars 13 forks source link

Add ability to use either spelling of defence / defense #50

Closed jackbrown1993 closed 11 months ago

Coffee-fueled-deadlines commented 11 months ago

This will error out when you do user.skill('defense') or user.skill('defense') as you've put if skill = 'defense': skill = 'defence' but left it spelled defense in the skills list. I suggest swapping those around and doing if skill = 'defence': skill = 'defense' instead.

Coffee-fueled-deadlines commented 11 months ago

Check the above workflow:

=========================== short test summary info ============================
FAILED OSRSBytes/tests/hiscores_test.py::test - OSRSBytes.Hiscores.SkillError: ERROR: skill 'defence' does not exist
==================== 1 failed, 1 passed, 1 warning in 3.61s ====================
jackbrown1993 commented 11 months ago

How do you run the tests?

jackbrown1993 commented 11 months ago

This will error out when you do user.skill('defense') or user.skill('defense') as you've put if skill = 'defense': skill = 'defence' but left it spelled defense in the skills list. I suggest swapping those around and doing if skill = 'defence': skill = 'defense' instead.

I think I did this in the original pull request my bad... will fix and start paying more attention :)

Coffee-fueled-deadlines commented 11 months ago

How do you run the tests?

The tests are available to run when a Pull request is made. I think I have to approve them but I could look into modifying that. If you forked it, they should appear under actions at the top