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
65ba952f
Unverified
Commit
65ba952f
authored
Oct 25, 2019
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the custom logic for the run command
parent
70f5d162
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
48 deletions
+0
-48
poetry/console/args/__init__.py
+0
-0
poetry/console/args/run_args_parser.py
+0
-41
poetry/console/commands/run.py
+0
-7
No files found.
poetry/console/args/__init__.py
deleted
100644 → 0
View file @
70f5d162
poetry/console/args/run_args_parser.py
deleted
100644 → 0
View file @
70f5d162
from
clikit.api.args
import
Args
from
clikit.api.args
import
RawArgs
from
clikit.api.args.format
import
ArgsFormat
from
clikit.api.args.format
import
ArgsFormatBuilder
from
clikit.args
import
DefaultArgsParser
class
RunArgsParser
(
DefaultArgsParser
):
"""
Parser that just parses command names and leave the rest
alone to be passed to the command.
"""
def
parse
(
self
,
args
,
fmt
,
lenient
=
False
):
# type: (RawArgs, ArgsFormat, bool) -> Args
builder
=
ArgsFormatBuilder
()
builder
.
set_command_names
(
*
fmt
.
get_command_names
())
builder
.
set_arguments
(
*
fmt
.
get_arguments
()
.
values
())
fmt
=
builder
.
format
return
super
(
RunArgsParser
,
self
)
.
parse
(
args
,
fmt
,
True
)
def
_parse
(
self
,
raw_args
,
fmt
,
lenient
):
# type: (RawArgs, ArgsFormat, bool) -> None
"""
Parse everything as a single, multi-valued argument.
"""
tokens
=
raw_args
.
tokens
[:]
last_arg
=
list
(
fmt
.
get_arguments
()
.
values
())[
-
1
]
self
.
_arguments
[
last_arg
.
name
]
=
[]
while
True
:
try
:
token
=
tokens
.
pop
(
0
)
except
IndexError
:
break
self
.
_arguments
[
last_arg
.
name
]
.
append
(
token
)
poetry/console/commands/run.py
View file @
65ba952f
...
@@ -12,13 +12,6 @@ class RunCommand(EnvCommand):
...
@@ -12,13 +12,6 @@ class RunCommand(EnvCommand):
argument
(
"args"
,
"The command and arguments/options to run."
,
multiple
=
True
)
argument
(
"args"
,
"The command and arguments/options to run."
,
multiple
=
True
)
]
]
def
__init__
(
self
):
# type: () -> None
from
poetry.console.args.run_args_parser
import
RunArgsParser
super
(
RunCommand
,
self
)
.
__init__
()
self
.
config
.
set_args_parser
(
RunArgsParser
())
def
handle
(
self
):
def
handle
(
self
):
args
=
self
.
argument
(
"args"
)
args
=
self
.
argument
(
"args"
)
script
=
args
[
0
]
script
=
args
[
0
]
...
...
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