Skip to content

Commit 99fa21b

Browse files
tests: expect errors for raise NotImplemented() after #2918 fix
The calls.rs testcase still used bug= with no # E: lines, so it required zero diagnostics. Once NotImplementedType is not implicitly callable, those raises are errors; update expectations and drop the bug marker. Made-with: Cursor
1 parent c5e2d9a commit 99fa21b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pyrefly/lib/test/calls.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,16 +408,15 @@ def get_flow_version(run_id: str | None) -> str | None:
408408

409409
// https://github.com/facebook/pyrefly/issues/2918
410410
testcase!(
411-
bug = "Should error when calling NotImplemented (a constant, not a class)",
412411
test_call_not_implemented_constant,
413412
r#"
414413
# NotImplemented is a singleton constant, not a callable class.
415414
# Using NotImplemented() is always a mistake; they mean NotImplementedError().
416415
def broken():
417-
raise NotImplemented()
416+
raise NotImplemented() # E: Expected a callable
418417
419418
def also_broken():
420-
raise NotImplemented("not yet done")
419+
raise NotImplemented("not yet done") # E: Expected a callable
421420
"#,
422421
);
423422

0 commit comments

Comments
 (0)