pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Move `discord/utils.py` to a separate `discord/utils/` submodule.

Open Paillat-dev opened this issue 1 year ago • 1 comments

Summary

The utils.py file should be refactored in a submodule to allow better distinction between util features.

What is the feature request for?

The core library

The Problem

Currently utils, like most of the library's code actually, is present in quite long files, utils.py is currently 1244 lines long. This is generally not enjoyable, and long files should be, when possible avoided. Additionally, utils used for many purposes in the library and "served" to the user are mixed up without clear distinction in utils.py. It should not be too hard, compared to the rest of the lib, to split up utils functions by scope, and utils should in principle not be all in one file.

The Ideal Solution

The best solution would be to make an utils submodule with __init__ exporting the user-facing utils, and the rest being accessed directly.

The Current Solution

n/a

Additional Context

n/a

Paillat-dev avatar Nov 17 '24 15:11 Paillat-dev

I'm happy to work on this if you could assign me to it!

MattyTheHacker avatar May 20 '25 07:05 MattyTheHacker

https://github.com/Pycord-Development/pycord-next/pull/44

Paillat-dev avatar Aug 03 '25 13:08 Paillat-dev