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
b30577de
Unverified
Commit
b30577de
authored
Dec 18, 2019
by
finswimmer
Committed by
GitHub
Dec 18, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1618 from hukkinj1/invalid-typehints
Fix syntax errors in typehints
parents
00309a16
9eddf88f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
poetry/console/config/application_config.py
+5
-3
poetry/puzzle/provider.py
+2
-3
No files found.
poetry/console/config/application_config.py
View file @
b30577de
import
logging
import
logging
from
typing
import
Any
from
cleo.config
import
ApplicationConfig
as
BaseApplicationConfig
from
cleo.config
import
ApplicationConfig
as
BaseApplicationConfig
from
clikit.api.application.application
import
Application
from
clikit.api.application.application
import
Application
from
clikit.api.args.raw_args
import
RawArgs
from
clikit.api.args.raw_args
import
RawArgs
...
@@ -43,8 +45,8 @@ class ApplicationConfig(BaseApplicationConfig):
...
@@ -43,8 +45,8 @@ class ApplicationConfig(BaseApplicationConfig):
self
.
add_event_listener
(
PRE_HANDLE
,
self
.
set_env
)
self
.
add_event_listener
(
PRE_HANDLE
,
self
.
set_env
)
def
register_command_loggers
(
def
register_command_loggers
(
self
,
event
,
event_name
,
_
# type: PreHandleEvent # type: str
self
,
event
,
event_name
,
_
):
# type: (
...
) -> None
):
# type: (
PreHandleEvent, str, Any
) -> None
command
=
event
.
command
.
config
.
handler
command
=
event
.
command
.
config
.
handler
if
not
isinstance
(
command
,
Command
):
if
not
isinstance
(
command
,
Command
):
return
return
...
@@ -72,7 +74,7 @@ class ApplicationConfig(BaseApplicationConfig):
...
@@ -72,7 +74,7 @@ class ApplicationConfig(BaseApplicationConfig):
logger
.
setLevel
(
level
)
logger
.
setLevel
(
level
)
def
set_env
(
self
,
event
,
event_name
,
_
):
# type: (PreHandleEvent, str,
_
) -> None
def
set_env
(
self
,
event
,
event_name
,
_
):
# type: (PreHandleEvent, str,
Any
) -> None
from
poetry.utils.env
import
EnvManager
from
poetry.utils.env
import
EnvManager
command
=
event
.
command
.
config
.
handler
# type: EnvCommand
command
=
event
.
command
.
config
.
handler
# type: EnvCommand
...
...
poetry/puzzle/provider.py
View file @
b30577de
...
@@ -6,6 +6,7 @@ import time
...
@@ -6,6 +6,7 @@ import time
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
from
tempfile
import
mkdtemp
from
tempfile
import
mkdtemp
from
typing
import
Any
from
typing
import
List
from
typing
import
List
from
typing
import
Optional
from
typing
import
Optional
...
@@ -61,9 +62,7 @@ class Provider:
...
@@ -61,9 +62,7 @@ class Provider:
UNSAFE_PACKAGES
=
{
"setuptools"
,
"distribute"
,
"pip"
}
UNSAFE_PACKAGES
=
{
"setuptools"
,
"distribute"
,
"pip"
}
def
__init__
(
def
__init__
(
self
,
package
,
pool
,
io
):
# type: (Package, Pool, Any) -> None
self
,
package
,
pool
,
io
# type: Package # type: Pool
):
# type: (...) -> None
self
.
_package
=
package
self
.
_package
=
package
self
.
_pool
=
pool
self
.
_pool
=
pool
self
.
_io
=
io
self
.
_io
=
io
...
...
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