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

[Sniper] Extend support for different source formats #5642

Merged
merged 3 commits into from
Sep 24, 2016
Merged

[Sniper] Extend support for different source formats #5642

merged 3 commits into from
Sep 24, 2016

Conversation

Gobberwart
Copy link
Contributor

@Gobberwart Gobberwart commented Sep 24, 2016

Short Description:

I came across a source which provides json data in a nested format, eg. instead of {'id':1, 'name': 'pokemonname", 'lat':'blahblah' etc.} it's {'id':1 {'name': 'pokemonname", 'lat':'blahblah' etc.}}

Added code to check if still a dict after getting key and looping until we get lowest nest level.

Probably not going to happen often, but we might as well support as many variations of json sources as possible.

Also adds some functionality to "fix" names that are known to cause issues, example "mr-mime" -> "mr mime". Not much there yet, but we can add to it as we find more.

Note: This does not impact existing working sources, which should be converted from dict to list by this point.

Fixes/Resolves/Closes (please use correct syntax):

  • N/A

@mention-bot
Copy link

@Gobberwart, thanks for your PR! By analyzing the annotation information on this pull request, we identified @YvesHenri and @GhosterBot to be potential reviewers

Copy link
Contributor

@javajohnHub javajohnHub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Used to replace known "faulty" names with something we can recognise.
Starting with "mr-mine" -> "mr. mime", but can build on this as we find
more. Nidorans come to mind with unicode characters that should be "M"
or "F"
@Gobberwart Gobberwart merged commit e964722 into PokemonGoF:dev Sep 24, 2016
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.

3 participants