TimefoldAI / timefold-solver-python

Timefold Solver is an AI constraint solver for Python to optimize the Vehicle Routing Problem, Employee Rostering, Maintenance Scheduling, Task Assignment, School Timetabling, Cloud Optimization, Conference Scheduling, Job Shop Scheduling, Bin Packing and many more planning problems.
https://timefold.ai
Apache License 2.0
36 stars 3 forks source link

fix: Load globals that are subclasses or instances of a class being compiled lazily #67

Closed Christopher-Chianelli closed 3 months ago

Christopher-Chianelli commented 3 months ago

Previously, the entire global dict was loaded whenever a function was compiled. However, this causes issues if there is a global that is an instance or subclass of a class being compiled, and the class being compiled reference that global.

Now, when a class is being compiled, instances and subclasses of that class is excluded and loaded at runtime.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
98.2% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud