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
0e5f953e
Commit
0e5f953e
authored
Apr 17, 2022
by
Randy Döring
Committed by
Arun Babu Neelicattu
Apr 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
group_command: improve interface for subclassing
parent
6beef611
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
src/poetry/console/commands/group_command.py
+12
-3
No files found.
src/poetry/console/commands/group_command.py
View file @
0e5f953e
...
@@ -61,6 +61,15 @@ class GroupCommand(EnvCommand):
...
@@ -61,6 +61,15 @@ class GroupCommand(EnvCommand):
}
}
@property
@property
def
default_groups
(
self
)
->
set
[
str
]:
"""
The groups that are considered by the command by default.
Can be overridden to adapt behavior.
"""
return
self
.
non_optional_groups
@property
def
activated_groups
(
self
)
->
set
[
str
]:
def
activated_groups
(
self
)
->
set
[
str
]:
groups
=
{}
groups
=
{}
...
@@ -93,9 +102,9 @@ class GroupCommand(EnvCommand):
...
@@ -93,9 +102,9 @@ class GroupCommand(EnvCommand):
"</warning>"
"</warning>"
)
)
return
groups
[
"only"
]
or
self
.
non_optional_groups
.
union
(
return
groups
[
"only"
]
or
self
.
default_groups
.
union
(
groups
[
"with"
])
.
difference
(
groups
[
"with"
]
groups
[
"with
out
"
]
)
.
difference
(
groups
[
"without"
])
)
def
project_with_activated_groups_only
(
self
)
->
ProjectPackage
:
def
project_with_activated_groups_only
(
self
)
->
ProjectPackage
:
return
self
.
poetry
.
package
.
with_dependency_groups
(
return
self
.
poetry
.
package
.
with_dependency_groups
(
...
...
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