From 4ddf0d87995d120f07688aa815ea3938e16c4f44 Mon Sep 17 00:00:00 2001 From: Chris Sellers Date: Wed, 17 Apr 2024 17:51:09 +1000 Subject: [PATCH] Cleanup imports --- nautilus_trader/cache/cache.pyx | 8 ++++---- tests/unit_tests/backtest/test_commission_model.py | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/nautilus_trader/cache/cache.pyx b/nautilus_trader/cache/cache.pyx index 4e1425838587..d0ffe5af68e6 100644 --- a/nautilus_trader/cache/cache.pyx +++ b/nautilus_trader/cache/cache.pyx @@ -21,6 +21,7 @@ from collections import deque from decimal import Decimal from nautilus_trader.cache.config import CacheConfig +from nautilus_trader.core.rust.model import PriceType as PriceType_py from cpython.datetime cimport datetime from cpython.datetime cimport timedelta @@ -33,15 +34,12 @@ from nautilus_trader.cache.facade cimport CacheDatabaseFacade from nautilus_trader.common.component cimport LogColor from nautilus_trader.common.component cimport Logger from nautilus_trader.core.correctness cimport Condition +from nautilus_trader.core.rust.model cimport AggregationSource from nautilus_trader.core.rust.model cimport ContingencyType from nautilus_trader.core.rust.model cimport OmsType from nautilus_trader.core.rust.model cimport OrderSide from nautilus_trader.core.rust.model cimport PositionSide from nautilus_trader.core.rust.model cimport PriceType - -from nautilus_trader.core.rust.model import PriceType as PriceType_py - -from nautilus_trader.core.rust.model cimport AggregationSource from nautilus_trader.core.rust.model cimport TriggerType from nautilus_trader.execution.messages cimport SubmitOrder from nautilus_trader.model.data cimport Bar @@ -2475,9 +2473,11 @@ cdef class Cache(CacheFacade): The price type to filter the BarType objects. If None, no filtering is done based on price type. aggregation_source : AggregationSource, default AggregationSource.EXTERNAL The aggregation source to filter the BarType objects. + Returns ------- list[BarType] + """ Condition.type_or_none(instrument_id, InstrumentId, "instrument_id") Condition.type_or_none(price_type, PriceType_py, "price_type") diff --git a/tests/unit_tests/backtest/test_commission_model.py b/tests/unit_tests/backtest/test_commission_model.py index 87cc579eae40..3d09ff5a04cc 100644 --- a/tests/unit_tests/backtest/test_commission_model.py +++ b/tests/unit_tests/backtest/test_commission_model.py @@ -15,7 +15,6 @@ import pytest -# fmt: off from nautilus_trader.backtest.models import FixedFeeModel from nautilus_trader.backtest.models import MakerTakerFeeModel from nautilus_trader.model.currencies import USD @@ -28,9 +27,6 @@ from nautilus_trader.test_kit.stubs.execution import TestExecStubs -# fmt: on - - @pytest.fixture() def instrument() -> Instrument: return TestInstrumentProvider.default_fx_ccy("EUR/USD")