hikari-py / hikari

A Discord API wrapper for Python and asyncio built on good intentions.
https://docs.hikari-py.dev/en/stable
MIT License
815 stars 94 forks source link

Rewrite/Refactor parts of RESTClient impl. #2022

Open syncblaze opened 2 months ago

syncblaze commented 2 months ago

Summary

There is a lot of inconsistency which build up over the last few years in the way the diffrent rest methods are implemented. One big inconsistency for example is handling value of function parameters. I will leave a example for this here you can see that the None & undefined check is doubled. IMG_0192

Requirements

2021 needs to be merged first before this can makes sense doing

Why is this needed?

Consistency is nice and doubled checks are bad for developer expierence and prob a small bit performance.

Ideal implementation

Looking through most of the rest functions and refactor some of them where needed.

Checklist

syncblaze commented 2 months ago

this is just a small reminder for me for doing this so dont worry