Skip to content

Commit 0ba2a77

Browse files
author
Kai Wohlfahrt
committed
Use flake8 directly
pytest-flake8 seems to have some issues with ignores behaving differently locally and on Travis-CI
1 parent eeac7ef commit 0ba2a77

5 files changed

Lines changed: 15 additions & 10 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ matrix:
1414
- pip install pytest-flake8
1515
- pip install .
1616
script:
17-
- pytest --flake8 -m flake8
17+
- flake8 nuc_processing test setup.py
1818
after_success: []
1919
install:
2020
- pip install pytest-cov codecov

nuc_processing/NucProcess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ def map_reads(fastq_file, genome_index, align_exe, num_cpu, ambig, qual_scheme,
14491449
patt_4 = re.compile('(\d+) \(.+\) aligned >1 times')
14501450

14511451
cmd_args = [align_exe,
1452-
'-D', '20', '-R', '3', '-N', '0', '-L', '20', '-i', 'S,1,0.50',
1452+
'-D', '20', '-R', '3', '-N', '0', '-L', '20', '-i', 'S,1,0.50',
14531453
'-x', genome_index,
14541454
'-k', '2',
14551455
'--reorder',
@@ -2654,7 +2654,7 @@ def pie_values(data, names):
26542654
hist, edges = frag_sizes
26552655
data_set = [(int(edges[i]), int(val)) for i, val in enumerate(hist)]
26562656
svg_doc.graph(x1, y+chart_height, table_width/2, th-chart_height-40, [data_set], 'Size', 'Count',
2657-
names=None, colors=None, graph_type='line',
2657+
names=None, colors=None, graph_type='line',
26582658
symbols=None, line_widths=None, symbol_sizes=None,
26592659
legend=False, title=None, plot_offset=(80, 20))
26602660
y += th

nuc_processing/NucSvg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def color_func(x, p=pos_color, n=neg_color, b=bg_color):
465465
self.text(y_axis_label, (x3, y), anchor='middle', size=font_size, bold=False, font=font, color=line_color, angle=270, vert_align=None)
466466

467467
def graph(self, x, y, width, height, data_lists, x_label, y_label,
468-
names=None, colors=None, graph_type=LINE_TYPE,
468+
names=None, colors=None, graph_type=LINE_TYPE,
469469
symbols=None, line_widths=None, symbol_sizes=None,
470470
legend=False, title=None, x_labels=None, plot_offset=(100, 50),
471471
axis_color='black', bg_color='#F0F0F0', font=None, font_size=16, line_width=1,

nuc_processing/split_fastq_barcodes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ def get_bc_file_name(path_root, bc_key, sample_names, nsn, file_ext):
820820
msg = '{} barcode: {} count {:,} ({:.2f}%)'.format(sample_names[bc_key], bc_key, nb, nb/float(100.0*n_reads))
821821
info(msg)
822822

823-
_write_analysis_file(bc_counts, sample_names, analysis_file_path)
823+
_write_analysis_file(bc_counts, sample_names, analysis_file_path)
824824

825825

826826
if __name__ == '__main__':

setup.cfg

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
[tool:pytest]
2-
flake8-ignore =
1+
[flake8]
2+
ignore =
33
E401
44
E261
55
E111
66
E114
77
E129
8-
nuc_processing/test/*.py F403 F405
9-
nuc_processing/nuc_processing/*.py E501 E231 E228 E741
10-
flake8-max-line-length = 101
8+
E121
9+
E226
10+
W503
11+
W504
12+
13+
test/*.py F403 F405
14+
nuc_processing/*.py E501 E231 E228 E741
15+
max-line-length = 100

0 commit comments

Comments
 (0)