Skip to content

Commit

Permalink
Fix type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
femtotrader committed Feb 7, 2021
1 parent de146a0 commit 6d6acf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import csv
from termgraph import Candle
from typing import List


def load_data(file: str) -> [Candle]:
def load_data(file: str) -> List[Candle]:
with open(file) as csvfile:
reader = csv.reader(csvfile, delimiter=",")
next(reader) # skip first row
Expand Down
3 changes: 2 additions & 1 deletion termgraph/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from math import ceil, floor
from colorama import Fore, Style
from typing import List

__version__ = '0.1.0'

Expand Down Expand Up @@ -53,7 +54,7 @@ class CandleStickGraph:
COLOR_POSITIVE = Style.BRIGHT + Fore.GREEN
COLOR_NEGATIVE = Style.BRIGHT + Fore.RED

def __init__(self, data: [Candle], height: int):
def __init__(self, data: List[Candle], height: int):
self._height = height
self._data = data

Expand Down

0 comments on commit 6d6acf7

Please sign in to comment.