ZechCodes / dippy.core

☢️ EARLY ALPHA☢️ A bare-bones Discord gateway client that can be used to build Python bot frameworks for Discord.
MIT License
3 stars 6 forks source link

Update the permission models to use declarative models #19

Open ZechCodes opened 3 years ago

ZechCodes commented 3 years ago

Refer to the Using Declarative Models wiki.

Go through the permissions.py in dippy/core/api/models and do the following

  1. As the very first line add from __future__ import annotations as _
  2. Remove the import for the attrs module
  3. Import Model from dippy.core.model.models
  4. Remove all @attrs lines and update each class with to inherit Model
  5. Replace any attrib(...) assignments
    • You will need to import Field from dippy.core.models.fields
    • Replace attrib with Field
  6. Replace any json_arg(...) assignments the same way as attrib assignments

⚠️ Please make each file changed its own commit. ⚠️

rexdivakar commented 3 years ago

Hey @ZechCodes can i work on this ?

burning-eggs commented 3 years ago

Hey @rexdivakar! Sorry for the late response, Zech is currently busy but I'll assign you!

burning-eggs commented 3 years ago

Hey @rexdivakar, are you still working on this?

rexdivakar commented 3 years ago

Yes