experimental-design / bofire

Experimental design and (multi-objective) bayesian optimization.
https://experimental-design.github.io/bofire/
BSD 3-Clause "New" or "Revised" License
158 stars 20 forks source link

Update linting #335

Open bertiqwerty opened 6 months ago

bertiqwerty commented 6 months ago

Pyright and Ruff are out-dated. We can also try to replace Black by Ruff-Format and have one dependency less.

bertiqwerty commented 6 months ago

from Behrang in https://github.com/experimental-design/bofire/pull/279#discussion_r1452125612

When I understood this correctly, # type: ignore correctly, it operates on the line level. We could at some point activate reportUnnecessaryTypeIgnoreComment in Pyright's options. See https://github.com/microsoft/pyright/blob/main/docs/comments.md#line-level-diagnostic-suppression

from Johannes in https://github.com/experimental-design/bofire/pull/279#issuecomment-1892147019

Note that I moved the pyright config some time ago into the pyproject.toml, so the new flag for showing the unnecessary ignore statements should also go there, I think:

https://github.com/experimental-design/bofire/blob/33a2053e80c371791cb27364c442b83f866b1c09/pyproject.toml#L34

jduerholt commented 6 months ago

Hi Behrang,

I am in favor of using the reportUnnecessaryTypeIgnoreComment keyword and also to replace black by ruff-format!

Best,

Johannes

TobyBoyne commented 4 months ago

@bertiqwerty Are you still working on this issue? Following #383, there are now many unnecessary # type: ignores in bofire. I would be happy to help to remove some of these, and continue working on the typing system to remove as many of these comments as we can!

bertiqwerty commented 3 months ago

Hi Toby, this currently does not have a high priority for me. If you want to give it a try, feel free. You should not continue on MR #336 and restart from scratch, since a lot has changed recently.