Skip to content

Commit

Permalink
Document shared profiles
Browse files Browse the repository at this point in the history
These were added with 2d76984, with
tests and an example added with
57eb70a. Add some documentation on how
these can be created, including a link to the example profile in this
repo.

Add a link to these docs from where shared profiles are mentioned for
the `profile` config
  • Loading branch information
matthewhughes934 committed Feb 12, 2022
1 parent c6a4196 commit 9b54eba
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
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).

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

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
```

0 comments on commit 9b54eba

Please sign in to comment.