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
18a9e2df
Unverified
Commit
18a9e2df
authored
Feb 03, 2021
by
finswimmer
Committed by
GitHub
Feb 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: replace clikit by cleo in several places (#3634)
parent
855bc88b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
56 deletions
+11
-56
poetry/console/args/__init__.py
+0
-0
poetry/console/args/run_args_parser.py
+0
-41
poetry/console/commands/show.py
+1
-1
poetry/console/logging/io_handler.py
+2
-2
poetry/installation/executor.py
+1
-1
poetry/masonry/builders/editable.py
+1
-1
poetry/publishing/publisher.py
+3
-4
poetry/publishing/uploader.py
+2
-5
poetry/utils/shell.py
+1
-1
No files found.
poetry/console/args/__init__.py
deleted
100644 → 0
View file @
855bc88b
poetry/console/args/run_args_parser.py
deleted
100644 → 0
View file @
855bc88b
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/show.py
View file @
18a9e2df
...
@@ -11,7 +11,7 @@ from .env_command import EnvCommand
...
@@ -11,7 +11,7 @@ from .env_command import EnvCommand
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
cl
ikit.api
.io
import
IO
# noqa
from
cl
eo.io
.io
import
IO
# noqa
from
poetry.core.packages
import
Dependency
# noqa
from
poetry.core.packages
import
Dependency
# noqa
from
poetry.core.packages
import
Package
# noqa
from
poetry.core.packages
import
Package
# noqa
...
...
poetry/console/logging/io_handler.py
View file @
18a9e2df
...
@@ -6,7 +6,7 @@ from typing import TYPE_CHECKING
...
@@ -6,7 +6,7 @@ from typing import TYPE_CHECKING
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
logging
import
LogRecord
# noqa
from
logging
import
LogRecord
# noqa
from
cl
ikit.api
.io
import
IO
# noqa
from
cl
eo.io
.io
import
IO
# noqa
class
IOHandler
(
logging
.
Handler
):
class
IOHandler
(
logging
.
Handler
):
...
@@ -21,7 +21,7 @@ class IOHandler(logging.Handler):
...
@@ -21,7 +21,7 @@ class IOHandler(logging.Handler):
level
=
record
.
levelname
.
lower
()
level
=
record
.
levelname
.
lower
()
err
=
level
in
(
"warning"
,
"error"
,
"exception"
,
"critical"
)
err
=
level
in
(
"warning"
,
"error"
,
"exception"
,
"critical"
)
if
err
:
if
err
:
self
.
_io
.
error_line
(
msg
)
self
.
_io
.
write_
error_line
(
msg
)
else
:
else
:
self
.
_io
.
write_line
(
msg
)
self
.
_io
.
write_line
(
msg
)
except
Exception
:
except
Exception
:
...
...
poetry/installation/executor.py
View file @
18a9e2df
...
@@ -33,7 +33,7 @@ from .operations.update import Update
...
@@ -33,7 +33,7 @@ from .operations.update import Update
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
cl
ikit.api
.io
import
IO
# noqa
from
cl
eo.io
.io
import
IO
# noqa
from
poetry.config.config
import
Config
# noqa
from
poetry.config.config
import
Config
# noqa
from
poetry.repositories
import
Pool
# noqa
from
poetry.repositories
import
Pool
# noqa
...
...
poetry/masonry/builders/editable.py
View file @
18a9e2df
...
@@ -19,7 +19,7 @@ from poetry.utils.helpers import is_dir_writable
...
@@ -19,7 +19,7 @@ from poetry.utils.helpers import is_dir_writable
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
cl
ikit.api
.io
import
IO
# noqa
from
cl
eo.io
.io
import
IO
# noqa
from
poetry.core.poetry
import
Poetry
# noqa
from
poetry.core.poetry
import
Poetry
# noqa
from
poetry.utils.env
import
Env
# noqa
from
poetry.utils.env
import
Env
# noqa
...
...
poetry/publishing/publisher.py
View file @
18a9e2df
...
@@ -14,9 +14,8 @@ from .uploader import Uploader
...
@@ -14,9 +14,8 @@ from .uploader import Uploader
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
cleo.io
import
BufferedIO
# noqa
from
cleo.io.buffered_io
import
BufferedIO
# noqa
from
cleo.io
import
ConsoleIO
# noqa
from
cleo.io.null_io
import
NullIO
# noqa
from
clikit.io
import
NullIO
# noqa
from
..poetry
import
Poetry
# noqa
from
..poetry
import
Poetry
# noqa
...
@@ -30,7 +29,7 @@ class Publisher:
...
@@ -30,7 +29,7 @@ class Publisher:
def
__init__
(
def
__init__
(
self
,
poetry
,
io
self
,
poetry
,
io
):
# type: ("Poetry", Union["
ConsoleIO", "
BufferedIO", "NullIO"]) -> None
):
# type: ("Poetry", Union["BufferedIO", "NullIO"]) -> None
self
.
_poetry
=
poetry
self
.
_poetry
=
poetry
self
.
_package
=
poetry
.
package
self
.
_package
=
poetry
.
package
self
.
_io
=
io
self
.
_io
=
io
...
...
poetry/publishing/uploader.py
View file @
18a9e2df
...
@@ -29,8 +29,7 @@ from poetry.utils.patterns import wheel_file_re
...
@@ -29,8 +29,7 @@ from poetry.utils.patterns import wheel_file_re
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
cleo.io
import
ConsoleIO
# noqa
from
cleo.io.null_io
import
NullIO
# noqa
from
clikit.io
import
NullIO
# noqa
from
poetry.poetry
import
Poetry
# noqa
from
poetry.poetry
import
Poetry
# noqa
...
@@ -54,9 +53,7 @@ class UploadError(Exception):
...
@@ -54,9 +53,7 @@ class UploadError(Exception):
class
Uploader
:
class
Uploader
:
def
__init__
(
def
__init__
(
self
,
poetry
,
io
):
# type: ("Poetry", "NullIO") -> None
self
,
poetry
,
io
):
# type: ("Poetry", Union["ConsoleIO", "NullIO"]) -> None
self
.
_poetry
=
poetry
self
.
_poetry
=
poetry
self
.
_package
=
poetry
.
package
self
.
_package
=
poetry
.
package
self
.
_io
=
io
self
.
_io
=
io
...
...
poetry/utils/shell.py
View file @
18a9e2df
...
@@ -7,7 +7,7 @@ from typing import Any
...
@@ -7,7 +7,7 @@ from typing import Any
import
pexpect
import
pexpect
from
cl
ikit.utils
.terminal
import
Terminal
from
cl
eo
.terminal
import
Terminal
from
shellingham
import
ShellDetectionFailure
from
shellingham
import
ShellDetectionFailure
from
shellingham
import
detect_shell
from
shellingham
import
detect_shell
...
...
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