Skip to content
Snippets Groups Projects
Commit b236f79a authored by I. Nüske's avatar I. Nüske
Browse files

MNT: Ignore pylint error where the current code seems the best solution:

- In export_related.py export() we do not care which Exception is raised & need to continue
- In import_from_xml.py import_xml() the File from which the _checksum is deleted is created within this method
- In table_export.py BaseTableExporter.collect_information(), the method called by _call_find_function is not set, so determining which exceptions may be raised is difficult
- table_importer.py TSVImporter.read_file() only exists for backward compatibility
parent 4c88ff22
Branches
Tags
2 merge requests!128MNT: Added a warning when column metadata is not configured, and a better...,!126Fix pylint errors
......@@ -118,7 +118,7 @@ def export(cont, directory="."):
try:
el.download(target)
print("Downloaded:", target)
except Exception:
except Exception: # pylint: disable=broad-exception-caught
print("Failed download of:", target)
invert_ids(cont)
......
......@@ -63,7 +63,7 @@ def import_xml(filename, rerun=False, interactive=True):
for el in cont:
if isinstance(el, db.File):
el._checksum = None
el._checksum = None # pylint: disable=protected-access
target = os.path.join("downloads", el.path[1:])
if os.path.exists(target):
......
......@@ -172,7 +172,7 @@ class BaseTableExporter(object):
self.info[e] = val
else:
self._append_missing(e, d)
except Exception as exc:
except Exception as exc: # pylint: disable=broad-exception-caught
self._append_missing(e, d)
logger.error(exc)
# last resort: check if record has e as property:
......
......@@ -585,5 +585,5 @@ class CSVImporter(TableImporter):
class TSVImporter(CSVImporter):
def read_file(self, filename, **kwargs):
def read_file(self, filename, **kwargs): # pylint: disable=arguments-differ
return super().read_file(filename, sep="\t", **kwargs)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment