Skip to content

Commit 3d1047d

Browse files
antonsyndclaude
andcommitted
fix(dogfood): improve SPY0301 remediation hint for abstract class exports
Expand the SPY0301 retry hint to cover abstract class cross-module import failures, suggesting simplification (remove @abstract or move the class to the importing file). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3e4be5d commit 3d1047d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

build_tools/sharpy_dogfood/prompts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
(r"SPY0220.*list\[.*\?\]", "Cannot create list[T?] from mixed T and None literals. "
2121
"Use an empty list and .append() each value individually."),
2222
(r"SPY0301.*no exported symbol", "Check that the imported symbol name matches exactly "
23-
"(case-sensitive) and that the symbol is defined at the module's top level."),
23+
"(case-sensitive) and that the symbol is defined at the module's top level. "
24+
"If the symbol is an @abstract class, try simplifying: remove the @abstract decorator "
25+
"or move the class to the importing file. Abstract class cross-module imports can be unreliable."),
2426
(r"SPY0907", "An internal compiler error occurred. Try simplifying your code — "
2527
"avoid deeply nested generics or complex cross-module patterns."),
2628
(r"FormatException.*0x", "Hex literals are supported in Sharpy. If you see a FormatException, "

0 commit comments

Comments
 (0)