Describe the bug
Pretty simple -- FabgzWriter initializes a self.fh property, when it should be self._fh. This can mess up the functioning of the __del__ method during some code paths, although I think the impact is minimal.
To Reproduce
Run the test cases (eg test_fabgz.py::test_errors)
tests/test_fabgz.py::test_errors
/Users/jss009/code/biocommons.seqrepo/.venv-312/lib/python3.12/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <function FabgzWriter.__del__ at 0x107a83560>
Traceback (most recent call last):
File "/Users/jss009/code/biocommons.seqrepo/src/biocommons/seqrepo/fastadir/fabgz.py", line 173, in __del__
if self._fh is not None:
^^^^^^^^
AttributeError: 'FabgzWriter' object has no attribute '_fh'. Did you mean: 'fh'?
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
Expected behavior
The property should exist upon object destruction.
Describe the bug Pretty simple --
FabgzWriter
initializes aself.fh
property, when it should beself._fh
. This can mess up the functioning of the__del__
method during some code paths, although I think the impact is minimal.To Reproduce
Run the test cases (eg
test_fabgz.py::test_errors
)Expected behavior The property should exist upon object destruction.