Skip to content

Commit

Permalink
lint: Update flake8 and fix make_csv.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjwebb committed Jul 29, 2024
1 parent 33acc30 commit 9c64c32
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions make_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,23 @@ def publisher_dicts():
with open(os.path.join('out', 'comprehensiveness_{}.csv'.format(tab)), 'w') as fp:
writer = csv.writer(fp)
if tab == 'financials':
writer.writerow(['Publisher Name', 'Publisher Registry Id'] +
[x + ' (with valid data)' for x in comprehensiveness.column_headers[tab]] +
[x + ' (with any data)' for x in comprehensiveness.column_headers[tab]] +
['Using budget-not-provided'])
writer.writerow(['Publisher Name', 'Publisher Registry Id']
+ [x + ' (with valid data)' for x in comprehensiveness.column_headers[tab]]
+ [x + ' (with any data)' for x in comprehensiveness.column_headers[tab]]
+ ['Using budget-not-provided'])
for row in comprehensiveness.table():
writer.writerow([row['publisher_title'], row['publisher']] +
[row[slug + '_valid'] if slug in row else '-' for slug in comprehensiveness.column_slugs[tab]] +
[row[slug] if slug in row else '-' for slug in comprehensiveness.column_slugs[tab]] +
['Yes' if row['flag'] else '-'])
else:
writer.writerow(['Publisher Name', 'Publisher Registry Id'] +
[x + ' (with valid data)' for x in comprehensiveness.column_headers[tab]] +
[x + ' (with any data)' for x in comprehensiveness.column_headers[tab]])
writer.writerow(['Publisher Name', 'Publisher Registry Id']
+ [x + ' (with valid data)' for x in comprehensiveness.column_headers[tab]]
+ [x + ' (with any data)' for x in comprehensiveness.column_headers[tab]])
for row in comprehensiveness.table():
writer.writerow([row['publisher_title'], row['publisher']] +
[row[slug + '_valid'] if slug in row else '-' for slug in comprehensiveness.column_slugs[tab]] +
[row[slug] if slug in row else '-' for slug in comprehensiveness.column_slugs[tab]])
writer.writerow([row['publisher_title'], row['publisher']]
+ [row[slug + '_valid'] if slug in row else '-' for slug in comprehensiveness.column_slugs[tab]]
+ [row[slug] if slug in row else '-' for slug in comprehensiveness.column_slugs[tab]])

# with open(os.path.join('out', 'coverage.csv'), 'w') as fp:
# writer = csv.writer(fp)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[flake8]
ignore = E501
extend-ignore = E501

0 comments on commit 9c64c32

Please sign in to comment.