MagicTheGathering / mtg-sdk-python

Magic: The Gathering SDK - Python
MIT License
255 stars 45 forks source link

Add EditorConfig #22

Closed 0x326 closed 5 years ago

0x326 commented 5 years ago

EditorConfig is a universal project-level config file for all text editors and IDEs and I think this project could benefit from having one. It enables everyone to write code with the same amount of indentation and other whitespace rules (such as remove trailing whitespace, insert final newline).

0x326 commented 5 years ago

I'm not sure why the build is failing. The only changes this PR makes to the Python codebase is whitespace changes, so I can't imagine it is at fault

Reid-E commented 5 years ago

I'm not sure why the build is failing. The only changes this PR makes to the Python codebase is whitespace changes, so I can't imagine it is at fault

Many of these failures seem to be a result of server-side changes not reflected in the tests.

"FAIL: test_all_returns_supertypes (tests.test_supertype.TestSupertype)" is because "Host" was added to the list of supertypes in Unstable

"FAIL: test_all_returns_types (tests.test_type.TestType)" is -mostly- because of BFM which adds types "Summon" and "You'll", and Fraction Jackson which adds the 'Hero' subtype (erroneously included in the Types response). "Host" shouldn't be in that test, it should be in the supertypes test. Hero should be in the Types test.

"FAIL: test_where_filters_on_name (tests.test_set.TestSet)" is because of the addition of PKTK, Khan's Promos. This one was a little less obvious but can be seen if you make the call in-browser

"FAIL: test_generate_booster_returns_cards (tests.test_set.TestSet)" is because the server is, in fact, providing incorrectly-sized boosters. Making a couple calls in browser and throwing the response into a JSON Parser is an easy way to see this quickly.

"FAIL: test_all_returns_changelogs (tests.test_changelog.TestChangelog)" is because the server is, in fact, returning an empty changelog

"FAIL: test_find_returns_card (tests.test_card.TestCard)" is because the response added a newline character before the quote attribution, as seen in the failure log:

"ERROR: test_find_returns_set (tests.test_set.TestSet)" is because "border" has been removed from API responses.

The last commit on this project was June 2018. None of these test failures are your fault, the tests just need to be updated.