Closed DarkFenX closed 9 years ago
API was changed in 43b089dfa1e435c2b9a9daa9025ddf714062b769.
Consistent behavior when source-dependent features are used on fit which has no source assigned will be implemented later.
Fixed in 998730e342da9efdcac5be6299d2b603dfbee860
Just for the record: behavior is not 100% consistent. Some stuff will return empty value (e.g. getting nominal DPS of fit), because when source is switched to None - all items will unregister from stat tracker's damage dealer register. And some stuff (like agility factor fetched from stats endpoint) will raise NoSourceError because it still attempts to use source-dependent functionality.
But it should be either of those 2 really, unless i oversighted something.
Rewrite top-level API to be more like what pyfa-experimental has:
This will also let us to improve logging - log not only when fit is assigned to Eos instance, but always (use python-wide logger which is actually possible now, but less motivation to do it).
Also, investigate if it's possible to consistently fail various operations on fit / holders when no source assigned to fit (ATM result is barely predictable, let alone consistent) - by returning empty values (None/()/{} etc) or raising special exception. If possible, it should cost nothing during regular operation (when fit has source) but it's probably okay to sacrifice some performance when switching fit's source.