cutile-python icon indicating copy to clipboard operation
cutile-python copied to clipboard

[BUG]: __eq__ in SliceType seems implement error, should be isinstance(other, SliceType)

Open tsung-li opened this issue 2 weeks ago • 1 comments

Version

1.0.0

Version

13.1

Which installation method(s) does this occur on?

Source

Describe the bug.

class SliceType(Type): _instance = None

def __new__(cls):
    if cls._instance is None:
        cls._instance = super().__new__(cls)
    return cls._instance

def __str__(self):
    return "Slice"

def __eq__(self, other: Type):
    return isinstance(other, NoneType)

def __hash__(self):
    return hash("SliceType")

Minimum reproducible example


Relevant log output


Full env printout


Other/Misc.

No response

Contributing Guidelines

  • [x] I agree to follow cuTile Python's contributing guidelines
  • [x] I have searched the open bugs and have found no duplicates for this bug report

tsung-li avatar Dec 06 '25 11:12 tsung-li

Hi! I'd like to work on this issue if it's available. Could you please assign it to me?

rockygeekz avatar Dec 06 '25 13:12 rockygeekz

Thank you @tsung-li for reporting and @Navneetpandit7226 for submitting a fix. The change has been integrated into main.

haijieg avatar Dec 10 '25 20:12 haijieg