Closed manvithn closed 8 months ago
Yeah, I can confirm it does. But I recommend ruff, which doesn't.
If you do want pylint however, I'm not sure how to fix it yet. This is the entrypoint for alive-progress' alive_bar:
def alive_bar(total: Optional[int] = None, *, calibrate: Optional[int] = None, **options: Any):
return __alive_bar(config, total, calibrate=calibrate)
@contextmanager
def __alive_bar(config, total=None, *, calibrate=None,
_cond=threading.Condition, _sampling=False, _testing=None):
Note it returns a @contextmanager
, no mention of Callable indeed.
But even if I do change them to:
def alive_bar(total: Optional[int] = None, *, calibrate: Optional[int] = None, **options: Any) -> Callable:
return __alive_bar(config, total, calibrate=calibrate)
@contextmanager
def __alive_bar(config, total=None, *, calibrate=None,
_cond=threading.Condition, _sampling=False, _testing=None) -> Callable:
It still doesn't work on pylint (2.17.6). Any suggestions?
Closing this one, but feel free to reply if there's any news.
This might be a pylint issue, but on any code like this
pylint-2.17.4 will give the message that progress is not callable: E1102:not-callable. I did see https://github.com/pylint-dev/pylint/issues/1746 which was closed a while ago, or it might be that we need some type hint in alive_bar.