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
d7e0e97c
Commit
d7e0e97c
authored
Jun 02, 2022
by
David Hotham
Committed by
Bjorn Neergaard
Jun 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typechecking tweaks
parent
5c60dace
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
src/poetry/factory.py
+4
-3
src/poetry/mixology/assignment.py
+1
-2
src/poetry/packages/package_collection.py
+2
-1
src/poetry/puzzle/provider.py
+2
-2
No files found.
src/poetry/factory.py
View file @
d7e0e97c
...
...
@@ -293,14 +293,15 @@ class Factory(BaseFactory):
if
extras_section
:
content
[
"extras"
]
=
extras_section
pyproject
.
add
(
tomlkit
.
nl
())
# type: ignore[attr-defined]
pyproject
=
cast
(
TOMLDocument
,
pyproject
)
pyproject
.
add
(
tomlkit
.
nl
())
if
path
:
path
.
joinpath
(
"pyproject.toml"
)
.
write_text
(
pyproject
.
as_string
(),
encoding
=
"utf-8"
# type: ignore[attr-defined]
pyproject
.
as_string
(),
encoding
=
"utf-8"
)
return
cast
(
TOMLDocument
,
pyproject
)
return
pyproject
@classmethod
def
validate
(
...
...
src/poetry/mixology/assignment.py
View file @
d7e0e97c
from
__future__
import
annotations
from
typing
import
TYPE_CHECKING
from
typing
import
Any
from
poetry.mixology.term
import
Term
...
...
@@ -51,7 +50,7 @@ class Assignment(Term):
@classmethod
def
derivation
(
cls
,
dependency
:
An
y
,
dependency
:
Dependenc
y
,
is_positive
:
bool
,
cause
:
Incompatibility
,
decision_level
:
int
,
...
...
src/poetry/packages/package_collection.py
View file @
d7e0e97c
from
__future__
import
annotations
from
typing
import
TYPE_CHECKING
from
typing
import
List
from
poetry.packages.dependency_package
import
DependencyPackage
...
...
@@ -12,7 +13,7 @@ if TYPE_CHECKING:
from
poetry.core.packages.package
import
Package
class
PackageCollection
(
list
):
# type: ignore[type-arg]
class
PackageCollection
(
List
[
DependencyPackage
]):
def
__init__
(
self
,
dependency
:
Dependency
,
...
...
src/poetry/puzzle/provider.py
View file @
d7e0e97c
...
...
@@ -12,7 +12,6 @@ from collections import defaultdict
from
contextlib
import
contextmanager
from
pathlib
import
Path
from
typing
import
TYPE_CHECKING
from
typing
import
Any
from
typing
import
cast
from
cleo.ui.progress_indicator
import
ProgressIndicator
...
...
@@ -45,6 +44,7 @@ if TYPE_CHECKING:
from
collections.abc
import
Iterable
from
collections.abc
import
Iterator
from
cleo.io.io
import
IO
from
poetry.core.packages.dependency
import
Dependency
from
poetry.core.packages.package
import
Package
from
poetry.core.packages.specification
import
PackageSpecification
...
...
@@ -125,7 +125,7 @@ class Provider:
self
,
package
:
Package
,
pool
:
Pool
,
io
:
Any
,
io
:
IO
,
env
:
Env
|
None
=
None
,
installed
:
Repository
|
None
=
None
,
)
->
None
:
...
...
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