-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
questionFurther information is requestedFurther information is requested
Description
One thing that I've considered a couple times is the use of the hardcoded category values for stdlib and first party modules. Specifically for cases where the user potentially does the following in their project config:
[tool.usort]
categories = ["catchall", "numpy"]
default_category = "catchall"
The future, stdlib, and first-party detection, all hardcode categories that wouldn't be in the configured category list, and I'm not sure how that ends up working in the sorting system, or what the correct way to deal with this would be (other than more configuration options that I don't think we want). Maybe we need to do something like known[module] = CAT_FIRST_PARTY if CAT_FIRST_PARTY in config.categories else config.default_category
. But maybe something that makes that easier rather than repeating that everywhere? 🤷
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested