tpaviot / ProcessScheduler

A Python package for automatic and optimized resource scheduling
https://processscheduler.github.io/
GNU General Public License v3.0
59 stars 17 forks source link

Change indicator bound with bounds tuple #70

Closed dreinon closed 3 years ago

dreinon commented 3 years ago

Related to conversation: https://github.com/tpaviot/ProcessScheduler/pull/67#discussion_r649206948

tpaviot commented 3 years ago

Azure build has failed with error

  File "/home/vsts/work/1/s/processscheduler/objective.py", line 28, in Indicator
    bounds: Optional[tuple[Optional[int]]] = None) -> None:
TypeError: 'type' object is not subscriptable
dreinon commented 3 years ago

My bad. I'm travelling to Barcelona today so I'll check it out tonight.

dreinon commented 3 years ago

My bad. I'm travelling to Barcelona today so I'll check it out tonight.

I don't know if you can change it, but the problem comes from tuple being the standard python type (subscriptable since python 3. ¿9?) This has to be modified with Tuple type from typing library to make the code compatible with older python versions.

So it's actually just changing t to Uppercase and import Tuple from typing if not done already.

tpaviot commented 3 years ago

Committing changes from your mobile phone? I never reached such a damn reactivity!

dreinon commented 3 years ago

Lol haha it was just 1 letter

dreinon commented 3 years ago

Can you merge max-utilization with master?