Skip to content

fix: do not display None in LCA_Database repr#3923

Open
haoyu-haoyu wants to merge 1 commit intosourmash-bio:latestfrom
haoyu-haoyu:fix/lca-repr-none
Open

fix: do not display None in LCA_Database repr#3923
haoyu-haoyu wants to merge 1 commit intosourmash-bio:latestfrom
haoyu-haoyu:fix/lca-repr-none

Conversation

@haoyu-haoyu
Copy link
Copy Markdown

When LCA_Database is created without loading from a file, self.filename is None, causing repr() to show LCA_Database('None') instead of something sensible.

Before: LCA_Database('None')
After: LCA_Database()

One-line change in src/sourmash/lca/lca_db.py.

Closes #1193

When LCA_Database is created without loading from a file, self.filename
is None, causing repr to show LCA_Database('None'). Return
LCA_Database() instead when filename is unset.

Closes sourmash-bio#1193
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix LCA_Database __repr__ so that None is not displayed

1 participant