Fix editable package test failing on windows.#2232
Closed
jvansch1 wants to merge 1 commit intofacebook:mainfrom
Closed
Fix editable package test failing on windows.#2232jvansch1 wants to merge 1 commit intofacebook:mainfrom
jvansch1 wants to merge 1 commit intofacebook:mainfrom
Conversation
rchen152
approved these changes
Jan 26, 2026
Contributor
rchen152
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
This comment has been minimized.
This comment has been minimized.
dc08aa9 to
a38eeca
Compare
jvansch1
added a commit
to jvansch1/pyrefly
that referenced
this pull request
Jan 26, 2026
Summary: In the previous implementation this editable package feature, we hard-coded a path prefix which did not work in windows environments. Now we programatically parse this URL instead of relying on a hard-coded string. Reviewed By: rchen152 Differential Revision: D91489776
|
Diff from mypy_primer, showing the effect of this PR on open source code: openlibrary (https://github.com/internetarchive/openlibrary)
+ ERROR openlibrary/plugins/openlibrary/lists.py:811:43-813:18: Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]` [unsupported-operation]
+ ERROR openlibrary/plugins/openlibrary/lists.py:818:40-88: Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]` [unsupported-operation]
+ ERROR openlibrary/plugins/openlibrary/lists.py:823:42-825:18: Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]` [unsupported-operation]
+ ERROR openlibrary/plugins/upstream/tests/test_merge_authors.py:142:12-52: Object of class `NoneType` has no attribute `key` [missing-attribute]
+ ::error file=openlibrary/plugins/openlibrary/lists.py,line=811,col=43,endLine=813,endColumn=18,title=Pyrefly unsupported-operation::Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]`%0A Argument `list[Thing | Unknown]` is not assignable to parameter `value` with type `list[dict[Unknown, Unknown]]` in function `dict.__setitem__`
+ ::error file=openlibrary/plugins/openlibrary/lists.py,line=818,col=40,endLine=818,endColumn=88,title=Pyrefly unsupported-operation::Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]`%0A Argument `list[Thing | Unknown]` is not assignable to parameter `value` with type `list[dict[Unknown, Unknown]]` in function `dict.__setitem__`
+ ::error file=openlibrary/plugins/openlibrary/lists.py,line=823,col=42,endLine=825,endColumn=18,title=Pyrefly unsupported-operation::Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]`%0A Argument `list[Thing | Unknown]` is not assignable to parameter `value` with type `list[dict[Unknown, Unknown]]` in function `dict.__setitem__`
- ::error file=openlibrary/plugins/upstream/tests/test_merge_authors.py,line=37,col=9,endLine=37,endColumn=12,title=Pyrefly bad-override::Class member `MockSite.get` overrides parent class `Site` in an inconsistent manner%0A `MockSite.get` has type `BoundMethod[MockSite, (self: MockSite, key: Unknown) -> Unknown]`, which is not assignable to `BoundMethod[MockSite, (self: MockSite, key: Unknown, revision: Unknown | None = None, lazy: bool | Unknown = False) -> Unknown | None]`, the type of `Site.get`
+ ::error file=openlibrary/plugins/upstream/tests/test_merge_authors.py,line=37,col=9,endLine=37,endColumn=12,title=Pyrefly bad-override::Class member `MockSite.get` overrides parent class `Site` in an inconsistent manner%0A `MockSite.get` has type `BoundMethod[MockSite, (self: MockSite, key: Unknown) -> Thing | Unknown]`, which is not assignable to `BoundMethod[MockSite, (self: MockSite, key: Unknown, revision: Unknown | None = None, lazy: bool | Unknown = False) -> Thing | Unknown | None]`, the type of `Site.get`
+ ::error file=openlibrary/plugins/upstream/tests/test_merge_authors.py,line=142,col=12,endLine=142,endColumn=52,title=Pyrefly missing-attribute::Object of class `NoneType` has no attribute `key`
|
jvansch1
added a commit
to jvansch1/pyrefly
that referenced
this pull request
Jan 26, 2026
Summary: In the previous implementation this editable package feature, we hard-coded a path prefix which did not work in windows environments. Now we programatically parse this URL instead of relying on a hard-coded string. Reviewed By: rchen152 Differential Revision: D91489776
a38eeca to
8ca7c2a
Compare
Summary: In the previous implementation this editable package feature, we hard-coded a path prefix which did not work in windows environments. Now we programatically parse this URL instead of relying on a hard-coded string. Reviewed By: rchen152 Differential Revision: D91489776
8ca7c2a to
2781723
Compare
jvansch1
added a commit
to jvansch1/pyrefly
that referenced
this pull request
Jan 26, 2026
Summary: In the previous implementation this editable package feature, we hard-coded a path prefix which did not work in windows environments. Now we programatically parse this URL instead of relying on a hard-coded string. Reviewed By: rchen152 Differential Revision: D91489776
meta-codesync bot
pushed a commit
that referenced
this pull request
Jan 26, 2026
Summary: Pull Request resolved: #2233 Pull Request resolved: #2232 In the previous implementation this editable package feature, we hard-coded a path prefix which did not work in windows environments. Now we programatically parse this URL instead of relying on a hard-coded string. Reviewed By: rchen152 Differential Revision: D91489776 fbshipit-source-id: c65f56707e43486ed6a9f00403e22467ec41ccc7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: In the previous implementation this editable package feature, we hard-coded a path prefix which did not work in windows environments. Now we programatically parse this URL instead of relying on a hard-coded string.
Differential Revision: D91489776