This function cannot be used to check attacks on empty squares since pawn captures to empty squares will not validate as of now.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by niyazpk and has received 0 comments.