Skip to content

Commit

Permalink
Fix circular import TrainModelHandler <> PricecypherModel (#53)
Browse files Browse the repository at this point in the history
## Proposed changes
1. The `pricecypher.contracts` model imports both `TrainModelHandler`
and `PricecypherModel` during `__init__`.
2. The `TrainModelHandler` model imports `PricecypherModel form
pricecypher.contracts`
3. Which in turn makes the `pricecypher.contracts` model import the
`TrainModelHandler` again.

## Types of changes

What types of changes does your code introduce to this repository?

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)

## Testing

### Unit testing
n/a

### Manual testing
Use `TrainModelHandler` somewhere (just importing it should be enough)

## Further comments
n/a
  • Loading branch information
marijnvanderhorst authored Dec 3, 2024
1 parent 77d44df commit fb1886d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pricecypher/contracts/handlers/train_models_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from .base_handler import BaseHandler
from pricecypher.enums import AccessTokenGrantType
from pricecypher.contracts import PricecypherModel
from ..pricecypher_model import PricecypherModel


class TrainModelHandler(BaseHandler):
Expand Down

0 comments on commit fb1886d

Please # to comment.