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
a13ccf88
Commit
a13ccf88
authored
May 25, 2022
by
Arun Babu Neelicattu
Committed by
Randy Döring
May 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tomlkit: use is_super_table parameter
parent
dad4edc4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
src/poetry/console/commands/add.py
+3
-3
src/poetry/factory.py
+3
-9
No files found.
src/poetry/console/commands/add.py
View file @
a13ccf88
...
...
@@ -128,9 +128,9 @@ You can specify a package in the following forms:
section
=
poetry_content
[
"dependencies"
]
else
:
if
"group"
not
in
poetry_content
:
group_table
=
table
()
group_table
.
_is_super_table
=
True
poetry_content
.
value
.
_insert_after
(
"dependencies"
,
"group"
,
group_table
)
poetry_content
.
value
.
_insert_after
(
"dependencies"
,
"group"
,
table
(
is_super_table
=
True
)
)
groups
=
poetry_content
[
"group"
]
if
group
not
in
groups
:
...
...
src/poetry/factory.py
View file @
a13ccf88
...
...
@@ -208,9 +208,7 @@ class Factory(BaseFactory):
pyproject
:
dict
[
str
,
Any
]
=
tomlkit
.
document
()
tool_table
=
tomlkit
.
table
()
tool_table
.
_is_super_table
=
True
pyproject
[
"tool"
]
=
tool_table
pyproject
[
"tool"
]
=
tomlkit
.
table
(
is_super_table
=
True
)
content
:
dict
[
str
,
Any
]
=
tomlkit
.
table
()
pyproject
[
"tool"
][
"poetry"
]
=
content
...
...
@@ -286,14 +284,10 @@ class Factory(BaseFactory):
dependency_section
[
dep
.
name
]
=
constraint
else
:
if
"group"
not
in
content
:
_table
=
tomlkit
.
table
()
_table
.
_is_super_table
=
True
content
[
"group"
]
=
_table
content
[
"group"
]
=
tomlkit
.
table
(
is_super_table
=
True
)
if
group
not
in
content
[
"group"
]:
_table
=
tomlkit
.
table
()
_table
.
_is_super_table
=
True
content
[
"group"
][
group
]
=
_table
content
[
"group"
][
group
]
=
tomlkit
.
table
(
is_super_table
=
True
)
if
"dependencies"
not
in
content
[
"group"
][
group
]:
content
[
"group"
][
group
][
"dependencies"
]
=
tomlkit
.
table
()
...
...
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