PokemonGoF / PokemonGo-Bot-Backup

The Pokemon Go Bot, baking with community.
http://maps.pikabot.org
MIT License
109 stars 15 forks source link

use strip instead of replace for names with spaces #21

Closed ChaosMarc closed 8 years ago

ChaosMarc commented 8 years ago

The configuration of evolve_list and donot_evolve_list doesn't work for "Nidoran F" and "Nidoran M" because when splitting the commaseparated string to an array their names are completely stripped of whitespaces with .replace(" ", "") leading to "NidoranF" and "NidoranM". To prevent this .strip() should be used to trim only leading and trailing whitespaces.

DeXtroTip commented 8 years ago

Before, it was using strip() and then someone said it didn't work because "Nidoran F" and "Nidoran M" names in bot are stored as "NidoranF" and "NidoranM", that's why it was change to replace().

EDIT - I've checked and the bot actually stores the names as "Nidoran F" and "Nidoran M" so it should simply use strip() and not replace()

ChaosMarc commented 8 years ago

see https://github.com/PokemonGoF/PokemonGo-Bot/pull/5447