Skip to content

fix: use 'is None' and specific exceptions per PEP 8#2

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

fix: use 'is None' and specific exceptions per PEP 8#2
haosenwang1018 wants to merge 1 commit intoNVlabs:mainfrom
haosenwang1018:fix/none-comparison-and-bare-excepts

Conversation

@haosenwang1018
Copy link

Changes

  • vibe_attention/interface.py: == Noneis None (PEP 8 E711)
  • loss/benchmark.py: bare except:except Exception:
  • sampling/benchmark_all_topk.py: bare except:except Exception:

Bare except: catches BaseException including SystemExit/KeyboardInterrupt, preventing Ctrl+C from stopping benchmarks.

- vibe_attention/interface.py: '== None' → 'is None' for singleton check
- loss/benchmark.py: bare except → except Exception
- sampling/benchmark_all_topk.py: bare except → except Exception
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.

1 participant