mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-11-30 13:06:53 +01:00
lint
This commit is contained in:
parent
4f63bc4f4c
commit
4f099fb4a9
1 changed files with 4 additions and 5 deletions
|
|
@ -610,7 +610,7 @@ def _check_append_rep(content, start_list):
|
|||
has_regular_len_heads = True
|
||||
for chunk_num in range(len(start_list)):
|
||||
start = start_list[chunk_num]
|
||||
if chunk_num == len(start_list)-1:
|
||||
if chunk_num == len(start_list) - 1:
|
||||
stop = len(content)
|
||||
else:
|
||||
stop = start_list[chunk_num+1]
|
||||
|
|
@ -621,7 +621,7 @@ def _check_append_rep(content, start_list):
|
|||
break
|
||||
header_len_list.append(header_len)
|
||||
data_len_list.append(len(chunk) - header_len)
|
||||
|
||||
|
||||
if len(set(header_len_list)) > 1:
|
||||
warnings.warn("Not all headers have the same length. Data parts do.")
|
||||
has_regular_len_heads = False
|
||||
|
|
@ -653,7 +653,6 @@ def _read_chunk_structure(chunk, pattern, b2b):
|
|||
return gauge_line, corr_line, start_read, T
|
||||
|
||||
|
||||
|
||||
def _read_append_rep(filename, pattern, b2b, im, single, idl_func, cfg_func_args):
|
||||
with open(filename, 'r') as fp:
|
||||
content = fp.readlines()
|
||||
|
|
@ -674,10 +673,10 @@ def _read_append_rep(filename, pattern, b2b, im, single, idl_func, cfg_func_args
|
|||
|
||||
for chunk_num in range(len(chunk_start_lines)):
|
||||
start = chunk_start_lines[chunk_num]
|
||||
if chunk_num == len(chunk_start_lines)-1:
|
||||
if chunk_num == len(chunk_start_lines) - 1:
|
||||
stop = len(content)
|
||||
else:
|
||||
stop = chunk_start_lines[chunk_num+1]
|
||||
stop = chunk_start_lines[chunk_num + 1]
|
||||
chunk = content[start:stop]
|
||||
if not has_regular_len_heads:
|
||||
gauge_line, corr_line, start_read, T = _read_chunk_structure(chunk, pattern, b2b)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue