-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start paring down list via mypy.ini and fixing errors, 6 files to go …
…after this commit
- Loading branch information
Showing
23 changed files
with
71 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[flake8] | ||
ignore = W291,W503,E265,E266,E302,E722 | ||
max-line-length = 127 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
.mypy_cache, | ||
.pytest_cache, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,37 +4,18 @@ | |
# Copyright (C) 2015 by Christian Tremblay, P.Eng <[email protected]> | ||
# Licensed under LGPLv3, see file LICENSE in this source tree. | ||
# | ||
""" | ||
Points.py - Definition of points so operations on Read results are more convenient. | ||
""" | ||
|
||
# --- standard Python modules --- | ||
from datetime import datetime | ||
from collections import namedtuple | ||
import time | ||
from itertools import islice | ||
|
||
|
||
# --- 3rd party modules --- | ||
try: | ||
import pandas as pd | ||
from pandas.io import sql | ||
|
||
try: | ||
from pandas import Timestamp | ||
except ImportError: | ||
from pandas.lib import Timestamp | ||
_PANDAS = True | ||
except ImportError: | ||
_PANDAS = False | ||
|
||
from bacpypes.object import TrendLogObject | ||
from bacpypes.primitivedata import Date, Time | ||
|
||
# --- this application's modules --- | ||
from ...tasks.Poll import SimplePoll as Poll | ||
from ...tasks.Match import Match, Match_Value | ||
from ..io.IOExceptions import NoResponseFromController, UnknownPropertyError | ||
from ..utils.notes import note_and_log | ||
|
||
|
||
|
@@ -56,7 +37,6 @@ def __init__(self): | |
self.record_count = 0 | ||
self.total_record_count = 0 | ||
self.log_interval = 0 | ||
self.description = None | ||
self.statusFlags = None | ||
self.status_flags = { | ||
"in_alarm": False, | ||
|
@@ -196,7 +176,7 @@ def create_dataframe(self, log_buffer): | |
@property | ||
def history(self): | ||
self.read_log_buffer() | ||
if not _PANDAS: | ||
if not _PANDAS or self.properties._df is None: | ||
return dict( | ||
zip( | ||
self.properties._history_components["index"], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.