pommes-public / pommesdispatch

A bottom-up fundamental power market model for the German electricity sector
Other
7 stars 1 forks source link

Rigorous type checking leads to errors #41

Closed jokochems closed 1 year ago

jokochems commented 2 years ago

I shortly switched from the PyCharm IDE to VSCodium. In that process, I came across extensions that do type checking in Python, such as Pyright. Using these leads to detecting a bunch of "errors" in pommesispatch.

The explanation is given by the workflow:

Here is my personal opinion on this one:

A possible solution could be to initialize empty / default value objects of the right type when initializing a DispatchModel. This would be kind of easy to do, I guess.

@hannesfelipe and @yannickwerner What do you think about this one?

jokochems commented 1 year ago

This will be closed for now. It can be re-opened if deemed necessary.