Skip to content

Fix editable package test failing on windows.#2232

Closed
jvansch1 wants to merge 1 commit intofacebook:mainfrom
jvansch1:export-D91489776
Closed

Fix editable package test failing on windows.#2232
jvansch1 wants to merge 1 commit intofacebook:mainfrom
jvansch1:export-D91489776

Conversation

@jvansch1
Copy link
Contributor

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

@meta-cla meta-cla bot added the cla signed label Jan 26, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 26, 2026

@jvansch1 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D91489776.

Copy link
Contributor

@rchen152 rchen152 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@github-actions

This comment has been minimized.

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
@github-actions
Copy link

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
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
@jvansch1 jvansch1 closed this Jan 26, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants