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
7f152988
Commit
7f152988
authored
Jan 23, 2022
by
Daniel Eades
Committed by
Bjorn Neergaard
Jan 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
de-glob mypy whitelist for 'installation' module
parent
06fcff08
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
10 deletions
+18
-10
pyproject.toml
+6
-2
src/poetry/installation/noop_installer.py
+3
-3
src/poetry/installation/operations/operation.py
+7
-4
src/poetry/installation/operations/uninstall.py
+2
-1
No files found.
pyproject.toml
View file @
7f152988
...
@@ -136,8 +136,12 @@ module = [
...
@@ -136,8 +136,12 @@ module = [
'poetry.console.commands.source.add'
,
'poetry.console.commands.source.add'
,
'poetry.console.commands.update'
,
'poetry.console.commands.update'
,
'poetry.console.commands.version'
,
'poetry.console.commands.version'
,
'poetry.inspection.*'
,
'poetry.inspection.info'
,
'poetry.installation.*'
,
'poetry.installation.chef'
,
'poetry.installation.chooser'
,
'poetry.installation.executor'
,
'poetry.installation.installer'
,
'poetry.installation.pip_installer'
,
'poetry.mixology.assignment'
,
'poetry.mixology.assignment'
,
'poetry.mixology.failure'
,
'poetry.mixology.failure'
,
'poetry.mixology.incompatibility'
,
'poetry.mixology.incompatibility'
,
...
...
src/poetry/installation/noop_installer.py
View file @
7f152988
...
@@ -10,9 +10,9 @@ if TYPE_CHECKING:
...
@@ -10,9 +10,9 @@ if TYPE_CHECKING:
class
NoopInstaller
(
BaseInstaller
):
class
NoopInstaller
(
BaseInstaller
):
def
__init__
(
self
)
->
None
:
def
__init__
(
self
)
->
None
:
self
.
_installs
=
[]
self
.
_installs
:
List
[
"Package"
]
=
[]
self
.
_updates
=
[]
self
.
_updates
:
List
[
"Package"
]
=
[]
self
.
_removals
=
[]
self
.
_removals
:
List
[
"Package"
]
=
[]
@property
@property
def
installs
(
self
)
->
List
[
"Package"
]:
def
installs
(
self
)
->
List
[
"Package"
]:
...
...
src/poetry/installation/operations/operation.py
View file @
7f152988
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
typing
import
Optional
from
typing
import
Optional
from
typing
import
TypeVar
from
typing
import
TypeVar
from
typing
import
Union
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
@@ -10,11 +11,13 @@ T = TypeVar("T", bound="Operation")
...
@@ -10,11 +11,13 @@ T = TypeVar("T", bound="Operation")
class
Operation
:
class
Operation
:
def
__init__
(
self
,
reason
:
Optional
[
str
]
=
None
,
priority
:
int
=
0
)
->
None
:
def
__init__
(
self
,
reason
:
Optional
[
str
]
=
None
,
priority
:
Union
[
int
,
float
]
=
0
)
->
None
:
self
.
_reason
=
reason
self
.
_reason
=
reason
self
.
_skipped
=
False
self
.
_skipped
=
False
self
.
_skip_reason
=
None
self
.
_skip_reason
:
Optional
[
str
]
=
None
self
.
_priority
=
priority
self
.
_priority
=
priority
@property
@property
...
@@ -22,7 +25,7 @@ class Operation:
...
@@ -22,7 +25,7 @@ class Operation:
raise
NotImplementedError
raise
NotImplementedError
@property
@property
def
reason
(
self
)
->
str
:
def
reason
(
self
)
->
Optional
[
str
]
:
return
self
.
_reason
return
self
.
_reason
@property
@property
...
@@ -34,7 +37,7 @@ class Operation:
...
@@ -34,7 +37,7 @@ class Operation:
return
self
.
_skip_reason
return
self
.
_skip_reason
@property
@property
def
priority
(
self
)
->
int
:
def
priority
(
self
)
->
Union
[
float
,
int
]
:
return
self
.
_priority
return
self
.
_priority
@property
@property
...
...
src/poetry/installation/operations/uninstall.py
View file @
7f152988
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
typing
import
Optional
from
typing
import
Optional
from
typing
import
Union
from
poetry.installation.operations.operation
import
Operation
from
poetry.installation.operations.operation
import
Operation
...
@@ -13,7 +14,7 @@ class Uninstall(Operation):
...
@@ -13,7 +14,7 @@ class Uninstall(Operation):
self
,
self
,
package
:
"Package"
,
package
:
"Package"
,
reason
:
Optional
[
str
]
=
None
,
reason
:
Optional
[
str
]
=
None
,
priority
:
int
=
float
(
"inf"
),
priority
:
Union
[
float
,
int
]
=
float
(
"inf"
),
)
->
None
:
)
->
None
:
super
()
.
__init__
(
reason
,
priority
=
priority
)
super
()
.
__init__
(
reason
,
priority
=
priority
)
...
...
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