cleanup; remove unused imports

This commit is contained in:
Sean Breckenridge 2021-04-02 00:17:24 -07:00 committed by karlicoss
parent a11a3af597
commit 5ecd4b4810
39 changed files with 36 additions and 67 deletions

View file

@ -155,7 +155,6 @@ def stats():
#### NOTE: most of the stuff below is deprecated and remnants of my old code!
#### sorry for it, feel free to remove if you don't need it
import numpy as np # type: ignore
import matplotlib.pyplot as plt # type: ignore
from matplotlib.figure import Figure # type: ignore
from matplotlib.axes import Axes # type: ignore
@ -170,7 +169,6 @@ def hhmm(time: datetime):
# return fromstart / tick
import matplotlib.dates as mdates # type: ignore
from matplotlib.ticker import MultipleLocator, FixedLocator # type: ignore
def plot_one(sleep: SleepEntry, fig: Figure, axes: Axes, xlims=None, showtext=True):
span = sleep.completed - sleep.created

View file

@ -5,7 +5,7 @@ from pathlib import Path
from csv import DictReader
from itertools import islice
from typing import Dict, Any, NamedTuple, Dict
from typing import Dict, Any, NamedTuple
# sleep = []
# with open('2017.csv', 'r') as fo:
@ -14,7 +14,6 @@ from typing import Dict, Any, NamedTuple, Dict
# sleep
# print(line)
import numpy as np # type: ignore
import matplotlib.pyplot as plt # type: ignore
from numpy import genfromtxt # type: ignore
import matplotlib.pylab as pylab # type: ignore
@ -77,7 +76,6 @@ class SleepData(NamedTuple):
def iter_useful(data_file: str):
from csv import DictReader
with open(data_file) as fo:
reader = DictReader(fo)
for d in reader: