Skip to content

fix: replace bare excepts, use 'is None', fix file handle leak#23

Open
haosenwang1018 wants to merge 1 commit intoshowlab:mainfrom
haosenwang1018:fix/bare-excepts-none-checks-file-handles
Open

fix: replace bare excepts, use 'is None', fix file handle leak#23
haosenwang1018 wants to merge 1 commit intoshowlab:mainfrom
haosenwang1018:fix/bare-excepts-none-checks-file-handles

Conversation

@haosenwang1018
Copy link

Changes (7 files)

  • Bare except → except Exception (5 docling files): prevents catching SystemExit/KeyboardInterrupt
  • == Noneis None (asciidoc_backend, msword_backend): PEP 8 E711
  • File handle leak (baseline_docpres.py): open().read() → context manager

- 5 docling files: bare except → except Exception
- asciidoc/msword backends: '== None' → 'is None' (PEP 8 E711)
- baseline_docpres.py: use context manager for file read
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