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
7aca7b20
Commit
7aca7b20
authored
Apr 15, 2022
by
Arun Babu Neelicattu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli: add self show command
parent
26dc84d1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletions
+35
-1
src/poetry/console/application.py
+1
-0
src/poetry/console/commands/group_command.py
+1
-1
src/poetry/console/commands/self/show/__init__.py
+33
-0
No files found.
src/poetry/console/application.py
View file @
7aca7b20
...
@@ -87,6 +87,7 @@ COMMANDS = [
...
@@ -87,6 +87,7 @@ COMMANDS = [
"self install"
,
"self install"
,
"self remove"
,
"self remove"
,
"self update"
,
"self update"
,
"self show"
,
# Source commands
# Source commands
"source add"
,
"source add"
,
"source remove"
,
"source remove"
,
...
...
src/poetry/console/commands/group_command.py
View file @
7aca7b20
...
@@ -85,7 +85,7 @@ class GroupCommand(EnvCommand):
...
@@ -85,7 +85,7 @@ class GroupCommand(EnvCommand):
for
key
in
{
"with"
,
"without"
,
"only"
}:
for
key
in
{
"with"
,
"without"
,
"only"
}:
groups
[
key
]
=
{
groups
[
key
]
=
{
group
.
strip
()
group
.
strip
()
for
groups
in
self
.
option
(
key
)
for
groups
in
self
.
option
(
key
,
""
)
for
group
in
groups
.
split
(
","
)
for
group
in
groups
.
split
(
","
)
}
}
...
...
src/poetry/console/commands/self/show/__init__.py
0 → 100644
View file @
7aca7b20
from
__future__
import
annotations
from
cleo.helpers
import
option
from
poetry.console.commands.self.self_command
import
SelfCommand
from
poetry.console.commands.show
import
ShowCommand
class
SelfShowCommand
(
SelfCommand
,
ShowCommand
):
name
=
"self show"
options
=
[
option
(
"addons"
,
None
,
"List only add-on packages installed."
),
*
[
o
for
o
in
ShowCommand
.
options
if
o
.
name
in
{
"tree"
,
"latest"
,
"outdated"
}],
]
description
=
"Show packages from Poetry's runtime environment."
help
=
f
"""
\
The <c1>self show</c1> command behaves similar to the <c1>show</c1> command, but
working within Poetry's runtime environment. This lists all packages installed within
the Poetry install environment.
To show only additional packages that have been added via <c1>self add</c1> and their
dependencies use <c1>self show --addons</c1>.
This is managed in the <comment>{SelfCommand.get_default_system_pyproject_file()}</>
\
file.
"""
@property
def
activated_groups
(
self
)
->
set
[
str
]:
if
self
.
option
(
"addons"
,
False
):
return
{
SelfCommand
.
ADDITIONAL_PACKAGE_GROUP
}
return
super
(
ShowCommand
,
self
)
.
activated_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