> On 30 Dec 2023, at 15:11, Karsten Hilbert via Python-list > <python-list@python.org> wrote: > > queries = [{'SQL': 'SELECT %(value)s', 'args': {'value': 1}}] > > and > > run_queries(conn, queries:list[str|dict[str, Any]]): In cases like this I often use a wrapper class in place of a simple str. If you have a class SqlString then your type becomes list[SqlString]. You may find that SqlString gains interesting methods over time. Barry -- https://mail.python.org/mailman/listinfo/python-list
- Re: mypy question Greg Ewing via Python-list
- Aw: Re: mypy question Karsten Hilbert via Python-list
- Re: mypy question Thomas Passin via Python-list
- Aw: Re: mypy question Karsten Hilbert via Python-list
- Re: Aw: Re: mypy question Thomas Passin via Python-list
- Re: Aw: Re: mypy question Chris Angelico via Python-list
- Re: Aw: Re: mypy question Greg Ewing via Python-list
- Re: Aw: Re: mypy question Thomas Passin via Python-list
- Aw: Re: Re: mypy question Karsten Hilbert via Python-list
- Aw: Re: Re: mypy question Karsten Hilbert via Python-list
- Re: mypy question Barry via Python-list
- Re: mypy question Thomas Passin via Python-list
- Re: mypy question Greg Ewing via Python-list
- Re: mypy question Karsten Hilbert via Python-list
- Re: mypy question Thomas Passin via Python-list
- Re: mypy question Antoon Pardon via Python-list
- Re: mypy question Karsten Hilbert via Python-list
- Re: mypy question Karsten Hilbert via Python-list