Finite State Machine

Results 43 comments of Finite State Machine

I imagine there are a couple of factors resulting in this test case being unusual. The first is that simply importing `pyftpdlib` results in the creation of `Lock`s, triggering the...

This also affects triple-quoted strings, e.g.: ```python ''' This line is much too long. It's long enough to cause a warning. ====================== ''' # pylint: disable=line-too-long ``` This case was...

In case it's helpful to mention them, the author and reviewers of the pull request relating to #2738 are: @komodo472, @Pierre-Sassoulas, and @hippo91.

Thanks, @Gobot1234. If that's the case, I think this issue can be considered resolved.

Per this [gist](https://mypy-play.net/?mypy=latest&python=3.11&gist=ff1b24fcec355794c46e5196d3c1f574), what's happening today with mypy isn't maximally permissive, but it is consistent with the runtime: ```python3 from typing import ( ClassVar, ) from typing_extensions import ( Annotated,...

- verified to affect mypy 1.8.0 on Python 3.12 - refreshed reproduction case to account for an unrelated issue (fixed), new warning (`empty-body`) - added mypy-play[.]net gist link to bug...

There are also some problems with using `assert` statements to work around this, as in the following: ```python instance: Type[object] assert isinstance(instance, Hashable) # mypy thinks this is unsatisfiable ......

In fact, not all types are hashable: [mypy-play.net](https://mypy-play.net/?mypy=latest&python=3.12&gist=64bb89f3184da24efcafd10a50a14e49) ```python from __future__ import annotations from typing import * # this might seem to be reasonable: def test_func(klass: Type[object]) -> None: klasses:...

(That said, there _are_ errors issued by the example in #12993. IMHO this inconsistency is undesirable.)

> [...] mypy seems to consider `type[X]` hashable only if `X` is hashable, which seems completely unrelated. I think we can all agree that the hashability of `type[X]` has nothing...