2222
2323
2424def coercible (enum_type : type [M ]) -> type [M ]:
25- """Decorate coercible enumerations.
25+ """
26+ Decorate coercible enumerations.
2627
2728 Decorating an Enum class with this function will intercept calls to
2829 __new__ and perform a type coercion for the passed value. The type conversion
@@ -94,13 +95,12 @@ def coerced_new(enum: type[M], value: object) -> M:
9495
9596class StringyMixin :
9697 """
97- Mixin class for overloading __str__ on Enum types.
98- This will use the Enumerations subclass, if any, to modify
99- the behavior of str().
98+ Mixin class for overloading __str__ on Enum types. This will use the
99+ Enumerations subclass, if any, to modify the behavior of str().
100100
101- For subclasses of enum.Flag a comma separated string of names is returned.
102- For integer enumerations, the lowercase member name is returned.
103- For string enumerations, the value is returned.
101+ For subclasses of enum.Flag a comma separated string of names is
102+ returned. For integer enumerations, the lowercase member name is
103+ returned. For string enumerations, the value is returned.
104104
105105 """
106106
@@ -115,15 +115,19 @@ def __str__(self) -> str:
115115@unique
116116@coercible
117117class HistoricalGateway (StringyMixin , str , Enum ):
118- """Represents a historical data center gateway location."""
118+ """
119+ Represents a historical data center gateway location.
120+ """
119121
120122 BO1 = "https://hist.databento.com"
121123
122124
123125@unique
124126@coercible
125127class FeedMode (StringyMixin , str , Enum ):
126- """Represents a data feed mode."""
128+ """
129+ Represents a data feed mode.
130+ """
127131
128132 HISTORICAL = "historical"
129133 HISTORICAL_STREAMING = "historical-streaming"
@@ -133,7 +137,9 @@ class FeedMode(StringyMixin, str, Enum):
133137@unique
134138@coercible
135139class Dataset (StringyMixin , str , Enum ):
136- """Represents a dataset code (string identifier)."""
140+ """
141+ Represents a dataset code (string identifier).
142+ """
137143
138144 GLBX_MDP3 = "GLBX.MDP3"
139145 XNAS_ITCH = "XNAS.ITCH"
@@ -142,7 +148,9 @@ class Dataset(StringyMixin, str, Enum):
142148@unique
143149@coercible
144150class Schema (StringyMixin , str , Enum ):
145- """Represents a data record schema."""
151+ """
152+ Represents a data record schema.
153+ """
146154
147155 MBO = "mbo"
148156 MBP_1 = "mbp-1"
@@ -188,7 +196,9 @@ def get_record_type(self) -> type[DBNRecord]:
188196@unique
189197@coercible
190198class Encoding (StringyMixin , str , Enum ):
191- """Represents a data output encoding."""
199+ """
200+ Represents a data output encoding.
201+ """
192202
193203 DBN = "dbn"
194204 CSV = "csv"
@@ -198,7 +208,9 @@ class Encoding(StringyMixin, str, Enum):
198208@unique
199209@coercible
200210class Compression (StringyMixin , str , Enum ):
201- """Represents a data compression format (if any)."""
211+ """
212+ Represents a data compression format (if any).
213+ """
202214
203215 NONE = "none"
204216 ZSTD = "zstd"
@@ -207,7 +219,9 @@ class Compression(StringyMixin, str, Enum):
207219@unique
208220@coercible
209221class SplitDuration (StringyMixin , str , Enum ):
210- """Represents the duration before splitting for each batched data file."""
222+ """
223+ Represents the duration before splitting for each batched data file.
224+ """
211225
212226 DAY = "day"
213227 WEEK = "week"
@@ -218,7 +232,9 @@ class SplitDuration(StringyMixin, str, Enum):
218232@unique
219233@coercible
220234class Packaging (StringyMixin , str , Enum ):
221- """Represents the packaging method for batched data files."""
235+ """
236+ Represents the packaging method for batched data files.
237+ """
222238
223239 NONE = "none"
224240 ZIP = "zip"
@@ -228,7 +244,9 @@ class Packaging(StringyMixin, str, Enum):
228244@unique
229245@coercible
230246class Delivery (StringyMixin , str , Enum ):
231- """Represents the delivery mechanism for batched data."""
247+ """
248+ Represents the delivery mechanism for batched data.
249+ """
232250
233251 DOWNLOAD = "download"
234252 S3 = "s3"
@@ -238,7 +256,9 @@ class Delivery(StringyMixin, str, Enum):
238256@unique
239257@coercible
240258class SType (StringyMixin , str , Enum ):
241- """Represents a symbology type."""
259+ """
260+ Represents a symbology type.
261+ """
242262
243263 INSTRUMENT_ID = "instrument_id"
244264 RAW_SYMBOL = "raw_symbol"
@@ -249,7 +269,9 @@ class SType(StringyMixin, str, Enum):
249269@unique
250270@coercible
251271class RollRule (StringyMixin , str , Enum ):
252- """Represents a smart symbology roll rule."""
272+ """
273+ Represents a smart symbology roll rule.
274+ """
253275
254276 VOLUME = "volume"
255277 OPEN_INTEREST = "open_interst"
@@ -265,6 +287,7 @@ class SymbologyResolution(StringyMixin, str, Enum):
265287 - OK: All symbol mappings resolved.
266288 - PARTIAL: One or more symbols did not resolve on at least one date.
267289 - NOT_FOUND: One or more symbols where not found on any date in range.
290+
268291 """
269292
270293 OK = "ok"
@@ -276,7 +299,8 @@ class SymbologyResolution(StringyMixin, str, Enum):
276299@coercible
277300# Ignore type to work around mypy bug https://github.com/python/mypy/issues/9319
278301class RecordFlags (StringyMixin , IntFlag ): # type: ignore
279- """Represents record flags.
302+ """
303+ Represents record flags.
280304
281305 F_LAST
282306 Last message in the packet from the venue for a given `instrument_id`.
@@ -288,6 +312,7 @@ class RecordFlags(StringyMixin, IntFlag): # type: ignore
288312 The `ts_recv` value is inaccurate (clock issues or reordering).
289313
290314 Other bits are reserved and have no current meaning.
315+
291316 """
292317
293318 F_LAST = 128
0 commit comments