Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return NotImplemented not handled #19

Open
AA-Turner opened this issue Mar 11, 2025 · 1 comment
Open

return NotImplemented not handled #19

AA-Turner opened this issue Mar 11, 2025 · 1 comment

Comments

@AA-Turner
Copy link

When running on a single-module exemplar project, pyrefly complains that:

ERROR python\roman_numerals\__init__.py:99:16-30: Returned type `_NotImplementedType` is not assignable to declared return type `bool`
ERROR python\roman_numerals\__init__.py:105:16-30: Returned type `_NotImplementedType` is not assignable to declared return type `bool`

The relevant code is:

    def __eq__(self, other: object) -> bool:
        """Return self == other."""
        if isinstance(other, RomanNumeral):
            return self._value == other._value
        return NotImplemented

    def __lt__(self, other: object) -> bool:
        """Return self < other."""
        if isinstance(other, RomanNumeral):
            return self._value < other._value
        return NotImplemented
@yangdanny97
Copy link
Contributor

Thanks for the report, I added it to the checklist here: #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants