ChrisCScott / forecaster

A personal finances forecasting tool for Canadian retirement planning
Other
1 stars 2 forks source link

TaxSource TypeError re: metaclass conflict #76

Closed ChrisCScott closed 3 years ago

ChrisCScott commented 3 years ago

After upgrading to Python 3.10, attempting to run any test produces this error:

TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

This offending line of code is:

class TaxSource(Ledger, MoneyHandler):

It looks like Ledger and MoneyHandler don't play nice together. One way to solve this is to review the metaclasses of both of those classes and see if they can be aligned - but the better approach is probably first to ask whether MoneyHandler is needed in the first place.

ChrisCScott commented 3 years ago

Resolved by #7016cd7, which removed MoneyHandler as well as all references to Money and Decimal.