pfnet / pfrl

PFRL: a PyTorch-based deep reinforcement learning library
MIT License
1.2k stars 157 forks source link

CI failure: pfrl/collections/prioritized.py:303: error: Argument 4 to "_find" has incompatible type "float"; expected "Number" #170

Closed muupan closed 2 years ago

muupan commented 2 years ago

https://ci.preferred.jp/pfrl.lint/96690/#L52

muupan commented 2 years ago

The problem seems to be that mypy has issues with numbers.Number (https://github.com/python/mypy/issues/3186). mypy complains if x: numbers.Number = 0.1 (https://mypy-play.net/?mypy=latest&python=3.10&gist=4f5ad716766e34a409f15fdb346ea23d) I have no idea why it didn't complain before though.