milesrichardson / ParsePy

A relatively up-to-date fork of ParsePy, the Python wrapper for the Parse.com API. Originally maintained by @dgrtwo
MIT License
516 stars 184 forks source link

Add the ability to drop whole classes #101

Closed dankrause closed 9 years ago

dankrause commented 9 years ago

implments #100

dankrause commented 9 years ago

If there's a better place to put this, let me know, and I'll update the PR.

This should allow us to clean up after our unit tests, if we want.

dgrtwo commented 9 years ago

Why not from the object itself; i.e.

GameScore.drop()
dankrause commented 9 years ago

That is essentially what I'm doing here.

class GameScore(Object):
    pass

GameScore.drop_class() # completely removes the GameScore class from your app
dankrause commented 9 years ago

Odd, it doesn't seem to work when subclassing from Object. Only when subclassing from ParseBase (which Object is a subclass of...)

Any ideas?

dankrause commented 9 years ago

It should work when subclassed from Object now. I've also renamed the method to just "drop", rather than "drop_class".

dankrause commented 9 years ago

Or were you suggesting that I add the method to Object rather than ParseBase?