Skip to content

Commit

Permalink
document pyproject.toml tool.autoimport table
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasha10 committed Nov 21, 2021
1 parent 03e31dd commit 538872d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,23 @@ from os import getcwd # noqa: autoimport
getcwd()
```


# Configuration

`autoimport` uses the `maison` library to discover and read your project-local
`pyproject.toml` file (if it exists). This file can be used to configure
`autoimport`'s behavior: the `tool.autoimport.common_statements` table in that
file can be used to define a custom set of "common statements", overriding the
default set of common statements mentioned above. For example:

```toml
# pyproject.toml

[tool.autoimport.common_statements]
"np" = "import numpy as np"
"FooBar" = "from baz_qux import FooBar"
```

# References

As most open sourced programs, `autoimport` is standing on the shoulders of
Expand Down

0 comments on commit 538872d

Please sign in to comment.