Skip to content

fix: use specific exceptions and idiomatic None checks#54

Open
haosenwang1018 wants to merge 1 commit intostepfun-ai:mainfrom
haosenwang1018:fix/bare-excepts-and-none-comparison
Open

fix: use specific exceptions and idiomatic None checks#54
haosenwang1018 wants to merge 1 commit intostepfun-ai:mainfrom
haosenwang1018:fix/bare-excepts-and-none-comparison

Conversation

@haosenwang1018
Copy link
Copy Markdown

Changes

Bare except → specific exceptions

  • auto_model.py: except ImportError for optional hdbscan
  • index_ds.py: except RuntimeError for distributed init, except (IndexError, KeyError) for data access

!= Noneis not None (PEP 8 E711)

Fixed across 10 model files for self.ctc singleton checks.

- auto_model.py: except ImportError for optional dependency - index_ds.py: except RuntimeError for dist init check, except (IndexError, KeyError) for data access - models/*.py: 'self.ctc != None' → 'self.ctc is not None' (10 files)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant