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

add to_dict section to docs #22

Merged
merged 1 commit into from
Oct 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ the given option isn't found:
'default'
```

`ProjectConfig` also exposes a `to_dict()` method to return all the config
options:

```python
>>> config.to_dict()
{'foo': 'bar'}
```

# Source files

By default, `maison` will look for a `pyproject.toml` file. If you prefer to look
Expand All @@ -35,8 +43,10 @@ print(config)
```

!!! warning ""
Currently only `.toml` and `.ini` files are supported. `maison` also assumes that
the relevant section will be in a `[tool.{project_name}]` section for `.toml` files.
Currently only `.toml` and `.ini` files are supported and it's assumed that
an `.ini` file will be named `{project_name}.ini`. For `.toml` files
`maison` assumes that the relevant section will be in a
`[tool.{project_name}]` section.

To verify which source config file has been found, `ProjectConfig` exposes a
`config_path` property:
Expand Down