Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
c94c34c8
Unverified
Commit
c94c34c8
authored
Jun 05, 2020
by
Joey Wilhelm
Committed by
GitHub
Jun 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document expanded table syntax for dependencies (#2392)
parent
9734ca39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
docs/docs/dependency-specification.md
+28
-0
No files found.
docs/docs/dependency-specification.md
View file @
c94c34c8
...
...
@@ -179,6 +179,34 @@ foo = [
]
```
## Expanded dependency specification syntax
In the case of more complex dependency specifications, you may find that you
end up with lines which are very long and difficult to read. In these cases,
you can shift from using "inline table" syntax, to the "standard table" syntax.
An example where this might be useful is the following:
```
toml
[tool.poetry.dev-dependencies]
black
=
{version
=
"19.10b0"
,
allow-prereleases
=
true
,
python
=
"^3.6"
,
markers
=
"platform_python_implementation == 'CPython'}
```
As a single line, this is a lot to digest. To make this a little bit easier to
work with, you can do the following:
```
toml
[tool.poetry.dev-dependencies.black]
version
=
"19.10b0"
allow-prereleases
=
true
python
=
"^3.6"
markers
=
"platform_python_implementation == 'CPython'"
```
All of the same information is still present, and ends up providing the exact
same specification. It's simply split into multiple, slightly more readable,
lines.
!!!note
The constraints **must** have different requirements (like `python`)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment