python-trio / flake8-async

Highly opinionated linter for Trio code
https://flake8-async.readthedocs.io
MIT License
17 stars 2 forks source link

Fix get_matching_call when passed a single string as base. #130

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

Fixes #129 Introduced in 73c9fc50 when adding support for anyio.

jakkdl commented 1 year ago

I don't think this is the first time that I've been bit by assert_type("", Iterable[str]). Feels like something that should either be warned upon by type checkers ("don't pass a string to a function expecting an Iterable[str]") - or maybe just a check for bugbear to never use Iterable[str].

jakkdl commented 1 year ago

Hm, might bring it up with mypy/pyright or discuss.python.org - but that's for another time. Thanks for catching it!