Skip to content

Commit

Permalink
fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
xingularity committed Oct 15, 2024
1 parent 8c8e5a6 commit b7e5c76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions modmesh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
from . import onedim # noqa: F401
from . import system # noqa: F401
from . import toggle # noqa: F401
from . import timeseries_dataframe
from .timeseries_dataframe import * # noqa: F401, F403
from . import timeseries_dataframe # noqa: F401, F403
from .timeseries_dataframe import * # noqa: F401, F403


clinfo = core.ProcessInfo.instance.command_line
Expand Down
7 changes: 4 additions & 3 deletions modmesh/timeseries_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,19 @@ def read_from_text_file(
:type txt_path: str
:param delimiter: delimiter.
:type delimiter: str
:param timestamp_in_file: If the text file containing index column, expected to be integer.
:param timestamp_in_file: If the text file containing index column,
expected to be integer.
:type timestamp_in_file: bool
:prarm timestamp_column: Column which stores timestamp data.
:type timestamp_column: str
:return None
"""
if not os.path.exists(txt_path):
raise Exception("Text file '{}' does not exist".format(txt_path))

nd_arr = np.genfromtxt(txt_path, delimiter=delimiter)[1:]
index_column_num = 0 if timestamp_in_file else None

with open(txt_path, 'r') as f:
table_header = [x for x in f.readline().strip().split(delimiter)]
if timestamp_in_file:
Expand Down

0 comments on commit b7e5c76

Please sign in to comment.