FuelRats / pipsqueak

ED Fuel rats IRC bot
Other
13 stars 14 forks source link

Add config handler + UTs for it #263

Closed MHajoha closed 6 years ago

MHajoha commented 6 years ago

Also adapt the rest of the code to use the new config and reorganize tests into their own package.

theunkn0wn1 commented 6 years ago

It appears we ended up doing a bit of the same work on this, i implemented configs as python objects, as it was simplest from my point of view. It also made finding config fields via PyCharm easier, as the IDE can find the field names easily.

Hold on, did you just write a config handler from scratch? Why not use the confighandler library?

I think having a config file that is parsed as native python would be the best solution moving forward, as we won't have to do any fancy trickery to cast strings to other datatypes. This approach is also better supported by IDEs (it would seem).

For future pull requests: please be sure to include a new line at ends of files. thats a PEP8 thing.

MHajoha commented 6 years ago

Didn't I?

MHajoha commented 6 years ago

Oh, you're right the permissions and rat_command tests don't have newlines. I had pycharm move the classes and didn't have another look at those. As for 'thats a PEP8 thing'. Yes. I know, believe it or not.