harbor run -t openthoughts/tasktrove-swegym-tasks-patched-validated-v2-swegym-0540
harbor download openthoughts/tasktrove-swegym-tasks-patched-validated-v2-swegym-0540
python/mypy
9ce347083ec5810ad23f8727a111619bcb7029a5
python__mypy-15118
1.4
cd /testbed git clone https://github.com/python/mypy.git repo cd repo git checkout 9ce347083ec5810ad23f8727a111619bcb7029a5 # Activate environment source /opt/miniconda3/bin/activate conda activate testbed # Install dependencies pip install --prefer-binary -e .
no error when marking a method as both staticmethod and classmethod
staticmethod
classmethod
from typing import TypeVar from abc import ABC Self = TypeVar("Self") class Foo: @classmethod @staticmethod def foo(cls: type[Self]) -> Self: return cls()
playground
mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testClassMethodAndStaticMethod
Apply code changes directly inside /testbed/repo and use pytest to run any of the above test targets. Focus on making the failing tests succeed without regressing the existing passing suite.
/testbed/repo
pytest