Skip to content

Commit 2c21fc9

Browse files
generatedunixname89002005307016meta-codesync[bot]
authored andcommitted
Suppress type errors for Pyre upgrade - core_stats
Summary: This diff was automatically generated by the Pyre per-target upgrade tool. It adds `# pyre-fixme` or `pyrefly: ignore` comments to suppress type errors that will be introduced by an upcoming Pyre or Pyrefly release. These suppressions allow the upgrade to proceed without breaking existing code. Upgrading to new pyrefly Version. Without landing this diff your type checking tests may break. If assigned as a reviewer please help us get these diffs across the finish line. Thank you! #pyreupgrade Differential Revision: D113797201 fbshipit-source-id: 0a05ea407afba8774f98a3af09c5483fe7b8bbf9
1 parent d81fb46 commit 2c21fc9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_rake.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,21 +1704,21 @@ def test__hare_niemeyer_allocation_numpy_scalars(self) -> None:
17041704

17051705
# np.float64 proportions — the common case from Series.to_dict()
17061706
result = _hare_niemeyer_allocation(
1707-
# pyrefly: ignore [bad-argument-type]
1707+
# pyrefly: ignore [bad-argument-type, bad-assignment]
17081708
{"a": np.float64(0.2), "b": np.float64(0.8)},
17091709
5,
17101710
)
17111711
self.assertEqual(result, ["a", "b", "b", "b", "b"])
17121712
self.assertEqual(len(result), 5)
17131713

17141714
# np.int64 proportions (unnormalized counts)
1715-
# pyrefly: ignore [bad-argument-type]
1715+
# pyrefly: ignore [bad-argument-type, bad-assignment]
17161716
result2 = _hare_niemeyer_allocation({"x": np.int64(2), "y": np.int64(8)}, 10)
17171717
self.assertEqual(result2.count("x"), 2)
17181718
self.assertEqual(result2.count("y"), 8)
17191719

17201720
# Mixed Python float and np.float64
1721-
# pyrefly: ignore [bad-argument-type]
1721+
# pyrefly: ignore [bad-argument-type, bad-assignment]
17221722
result3 = _hare_niemeyer_allocation({"p": 0.3, "q": np.float64(0.7)}, 10)
17231723
self.assertEqual(len(result3), 10)
17241724

@@ -2334,7 +2334,7 @@ def __hash__(self) -> int:
23342334
return 0
23352335

23362336
with self.assertRaisesRegex(ValueError, "convertible to float"):
2337-
# pyrefly: ignore [bad-argument-type]
2337+
# pyrefly: ignore [bad-argument-type, bad-assignment]
23382338
_realize_dicts_of_proportions({"var": {"cat": BadReal()}})
23392339

23402340

0 commit comments

Comments
 (0)