Skip to content

Commit

Permalink
Merge pull request #1896 from matthewhughes934/document-shared-profiles
Browse files Browse the repository at this point in the history
Document shared profiles
  • Loading branch information
timothycrosley authored May 11, 2022
2 parents 5b1c9f0 + 9b54eba commit cad1a24
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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 cad1a24

Please sign in to comment.