1 SUSPECT #1
from decimal import Decimal
Decimal("1.5") + 0.1 Traceback (most recent call last):
File "lineup.py", line 2, in <module>
Decimal("1.5") + 0.1
~~~~~~~~~~~~~~~^~~~~
TypeError: unsupported operand type(s) for +: 'decimal.Decimal' and 'float' 2 SUSPECT #2
import asyncio
async def m():
async for x in [1, 2, 3]:
print(x)
asyncio.run(m()) Traceback (most recent call last):
File "lineup.py", line 7, in <module>
asyncio.run(m())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
File "lineup.py", line 4, in m
async for x in [1, 2, 3]:
TypeError: 'list' object is not an async iterable 3 SUSPECT #3
from functools import singledispatch
@singledispatch
def f(x): return f"base {x}"
@f.register
def _(x: str): return f"str {x}"
print(f(42)) Traceback (most recent call last):
File "lineup.py", line 9, in <module>
print(f(42))
~^^^^
NotImplementedError: singledispatch has no registration for int 4 SUSPECT #4
d = {"a": 1}
d |= 5 Traceback (most recent call last):
File "lineup.py", line 2, in <module>
d |= 5
TypeError: unsupported operand type(s) for |=: 'dict' and 'int' 5 SUSPECT #5
from dataclasses import replace
replace(object(), x=1) Traceback (most recent call last):
File "lineup.py", line 2, in <module>
replace(object(), x=1)
~~~~~~~^^^^^^^^^^^^^^^
TypeError: replace() should be called on dataclass instances