MIT-LCP / wfdb-python

Native Python WFDB package
MIT License
750 stars 303 forks source link

Fix: Indent code to ensure 'j' is within for-loop in GQRS algorithm #489

Closed Biboulder closed 4 months ago

Biboulder commented 5 months ago

The variable j was not properly scoped within the for-loop in the sm method, leading to an UnboundLocalError when j was accessed outside the loop.

tompollard commented 4 months ago

@Biboulder Thanks for picking this up! Please could you rebase the pull request on the main branch, and if possible add a simple test that covers the UnboundLocalError?

tompollard commented 4 months ago

I rebased on main and opened a new PR: https://github.com/MIT-LCP/wfdb-python/pull/499