Skip to content

Commit 54b83d5

Browse files
committed
add some comments
1 parent dcc0f2c commit 54b83d5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/poetry/installation/installer.py

+2
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ def _do_refresh(self) -> int:
201201
self._io,
202202
)
203203

204+
# Always re-solve directory dependencies, otherwise we can't determine
205+
# if anything has changed (and the lock file contains an invalid version).
204206
use_latest = [
205207
p.name for p in locked_repository.packages if p.source_type == "directory"
206208
]

tests/console/commands/test_lock.py

+6
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ def test_lock_no_update_path_dependencies(
179179
poetry_with_nested_path_deps_old_lockfile: Poetry,
180180
repo: TestRepository,
181181
):
182+
"""
183+
The lock file contains a variant of the directory dependency "quix" that does
184+
not depend on "sampleproject". Although the version of "quix" has not been changed,
185+
it should be re-solved because there is always only one valid version
186+
of a directory dependency at any time.
187+
"""
182188
repo.add_package(get_package("sampleproject", "1.3.1"))
183189

184190
locker = Locker(

0 commit comments

Comments
 (0)