clintval/sample-sheet

Re-write a few un-Pythonic lines

Closed this issue · 2 comments

A few suggestions/remarks:

self.__dict__.get(attr)

you can use collections.defaultdict(lambda: None) to achieve the same behavior as self.get(attr, None). But after looking to the code, I'm not sure why you need to overload __dict__.

change a class name

seems that you don't need that at all, just use

self.header = SampleSheetSection()

in SampleSheet's __init__

None if len(self.Reads) == 0

return None if not self.Reads else len(self.Reads) == 1

will do, as bool(iterable) will return False only if the iterable is empty.

Fixed in PR #24