Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document shared profiles #1896

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/configuration/options.md
Expand Up @@ -1132,7 +1132,10 @@ Inserts a blank line before a comment following an import.

## Profile

Base profile type to use for configuration. Profiles include: black, django, pycharm, google, open_stack, plone, attrs, hug, wemake, appnexus. As well as any shared profiles.
Base profile type to use for configuration. Profiles include: black, django,
pycharm, google, open\_stack, plone, attrs, hug, wemake, appnexus. As well as
any [shared
profiles](https://pycqa.github.io/isort/docs/howto/shared_profiles.html).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this will link where I want/expect them to link


**Type:** String
**Default:** ` `
Expand Down
18 changes: 18 additions & 0 deletions docs/howto/shared_profiles.md
@@ -0,0 +1,18 @@
# Shared Profiles
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this under docs/howto because I'm not sure where else might be best.


As well as the [built in
profiles](https://pycqa.github.io/isort/docs/configuration/profiles.html), you
can define and share your own profiles.

All that's required is to create a Python package that exposes an entry point to
a dictionary exposing profile settings under `isort.profiles`. An example is
available [within the `isort`
repo](https://github.com/PyCQA/isort/tree/main/example_shared_isort_profile)

### Example `.isort.cfg`

```
[options.entry_points]
isort.profiles =
shared_profile=my_module:PROFILE
```