You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have multiple python packages with the same first name, for example company.package1, company.package2, etc.
When in company.package1 Isort automatically flags company.package2 import as a third party, while Ruff detects every package starting with company as first party, changing the sort order.
then company.package2 is correctly formatted as a third party package, but this is not scalable as I have many of these packages and I would need to configure every package differently and update every one with every new package created.
I also tried setting known-third-party = ["company.*"], but this makes all company imports as third party, even the first party ones.
Is there some option to configure Ruff the way I need? Thank you.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I have multiple python packages with the same first name, for example
company.package1
,company.package2
, etc.When in
company.package1
Isort automatically flagscompany.package2
import as a third party, while Ruff detects every package starting withcompany
as first party, changing the sort order.If I use the following configuration:
then
company.package2
is correctly formatted as a third party package, but this is not scalable as I have many of these packages and I would need to configure every package differently and update every one with every new package created.I also tried setting
known-third-party = ["company.*"]
, but this makes all company imports as third party, even the first party ones.Is there some option to configure Ruff the way I need? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions