From cdfd64462895f3ef0f0c283920a736535a614218 Mon Sep 17 00:00:00 2001 From: Chris Sellers Date: Sat, 24 Feb 2024 08:19:24 +1100 Subject: [PATCH] Cleanup Databento adapter imports --- nautilus_core/adapters/src/databento/decode.rs | 2 +- nautilus_core/adapters/src/databento/loader.rs | 1 - nautilus_core/adapters/src/databento/python/decode.rs | 1 - nautilus_core/adapters/src/databento/python/historical.rs | 1 - nautilus_core/adapters/src/databento/python/live.rs | 2 +- nautilus_core/adapters/src/databento/python/loader.rs | 1 - nautilus_core/adapters/src/databento/symbology.rs | 2 +- nautilus_core/adapters/src/databento/types.rs | 1 - 8 files changed, 3 insertions(+), 8 deletions(-) diff --git a/nautilus_core/adapters/src/databento/decode.rs b/nautilus_core/adapters/src/databento/decode.rs index cd8885acb163..7523b05130da 100644 --- a/nautilus_core/adapters/src/databento/decode.rs +++ b/nautilus_core/adapters/src/databento/decode.rs @@ -21,7 +21,7 @@ use std::{ }; use anyhow::{anyhow, bail, Result}; -use databento::dbn::{self, Record}; +use databento::dbn::Record; use nautilus_core::{datetime::NANOSECONDS_IN_SECOND, time::UnixNanos}; use nautilus_model::{ data::{ diff --git a/nautilus_core/adapters/src/databento/loader.rs b/nautilus_core/adapters/src/databento/loader.rs index 2e57f1e8f553..fd863cf77b60 100644 --- a/nautilus_core/adapters/src/databento/loader.rs +++ b/nautilus_core/adapters/src/databento/loader.rs @@ -16,7 +16,6 @@ use std::{env, fs, path::PathBuf}; use anyhow::{bail, Result}; -use databento::dbn; use dbn::{ compat::InstrumentDefMsgV1, decode::{dbn::Decoder, DbnMetadata, DecodeStream}, diff --git a/nautilus_core/adapters/src/databento/python/decode.rs b/nautilus_core/adapters/src/databento/python/decode.rs index 68d9e060ee8f..71bcefc8abb8 100644 --- a/nautilus_core/adapters/src/databento/python/decode.rs +++ b/nautilus_core/adapters/src/databento/python/decode.rs @@ -13,7 +13,6 @@ // limitations under the License. // ------------------------------------------------------------------------------------------------- -use databento::dbn; use nautilus_core::{python::to_pyvalue_err, time::UnixNanos}; use nautilus_model::{ data::{depth::OrderBookDepth10, trade::TradeTick}, diff --git a/nautilus_core/adapters/src/databento/python/historical.rs b/nautilus_core/adapters/src/databento/python/historical.rs index d5d5888eb899..98d285ea32dd 100644 --- a/nautilus_core/adapters/src/databento/python/historical.rs +++ b/nautilus_core/adapters/src/databento/python/historical.rs @@ -15,7 +15,6 @@ use std::{fs, num::NonZeroU64, sync::Arc}; -use databento::dbn; use databento::historical::timeseries::GetRangeParams; use indexmap::IndexMap; use nautilus_core::{ diff --git a/nautilus_core/adapters/src/databento/python/live.rs b/nautilus_core/adapters/src/databento/python/live.rs index f38854114bd3..4ea1ac59160f 100644 --- a/nautilus_core/adapters/src/databento/python/live.rs +++ b/nautilus_core/adapters/src/databento/python/live.rs @@ -16,7 +16,7 @@ use std::{collections::HashMap, ffi::CStr, fs, str::FromStr, sync::Arc}; use anyhow::{anyhow, bail, Result}; -use databento::dbn::{self, PitSymbolMap, Record, SymbolIndex, VersionUpgradePolicy}; +use databento::dbn::{PitSymbolMap, Record, SymbolIndex, VersionUpgradePolicy}; use databento::live::Subscription; use indexmap::IndexMap; use log::{error, info}; diff --git a/nautilus_core/adapters/src/databento/python/loader.rs b/nautilus_core/adapters/src/databento/python/loader.rs index 4b1ce53a73ff..49eb69f7c3f1 100644 --- a/nautilus_core/adapters/src/databento/python/loader.rs +++ b/nautilus_core/adapters/src/databento/python/loader.rs @@ -15,7 +15,6 @@ use std::{any::Any, collections::HashMap, path::PathBuf}; -use databento::dbn; use nautilus_core::{ ffi::cvec::CVec, python::{to_pyruntime_err, to_pyvalue_err}, diff --git a/nautilus_core/adapters/src/databento/symbology.rs b/nautilus_core/adapters/src/databento/symbology.rs index 8f00c3a19e81..270a9f964cbb 100644 --- a/nautilus_core/adapters/src/databento/symbology.rs +++ b/nautilus_core/adapters/src/databento/symbology.rs @@ -14,7 +14,7 @@ // ------------------------------------------------------------------------------------------------- use anyhow::{bail, Result}; -use databento::dbn::{self, Record}; +use databento::dbn::Record; use nautilus_model::identifiers::{instrument_id::InstrumentId, symbol::Symbol, venue::Venue}; use ustr::Ustr; diff --git a/nautilus_core/adapters/src/databento/types.rs b/nautilus_core/adapters/src/databento/types.rs index 92c473b4c7d0..0e799a0010e4 100644 --- a/nautilus_core/adapters/src/databento/types.rs +++ b/nautilus_core/adapters/src/databento/types.rs @@ -13,7 +13,6 @@ // limitations under the License. // ------------------------------------------------------------------------------------------------- -use databento::dbn; use pyo3::prelude::*; use serde::Deserialize; use ustr::Ustr;