Skip to content

Commit

Permalink
Use Final qualifier for sentinels
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Oct 27, 2023
1 parent ac00896 commit 859ca86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion nautilus_trader/live/data_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import asyncio
from asyncio import Queue
from typing import Final

from nautilus_trader.cache.cache import Cache
from nautilus_trader.common.clock import LiveClock
Expand Down Expand Up @@ -55,7 +56,7 @@ class LiveDataEngine(DataEngine):
"""

_sentinel = None
_sentinel: Final[None] = None

def __init__(
self,
Expand Down
4 changes: 2 additions & 2 deletions nautilus_trader/live/execution_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import math
from asyncio import Queue
from decimal import Decimal
from typing import Any
from typing import Any, Final

from nautilus_trader.cache.cache import Cache
from nautilus_trader.common.clock import LiveClock
Expand Down Expand Up @@ -93,7 +93,7 @@ class LiveExecutionEngine(ExecutionEngine):
"""

_sentinel = None
_sentinel: Final[None] = None

def __init__(
self,
Expand Down
3 changes: 2 additions & 1 deletion nautilus_trader/live/risk_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import asyncio
from asyncio import Queue
from typing import Final

from nautilus_trader.cache.base import CacheFacade
from nautilus_trader.common.clock import LiveClock
Expand Down Expand Up @@ -56,7 +57,7 @@ class LiveRiskEngine(RiskEngine):
"""

_sentinel = None
_sentinel: Final[None] = None

def __init__(
self,
Expand Down

0 comments on commit 859ca86

Please sign in to comment.