Ok just read the code and found my answer
It was a typo it is repo-gpgcheck not repo_gpgcheck
repo_gpgcheck = (None if getStrAttribute(i, ['repo-gpgcheck'], default=None) is None
else getBoolAttribute(i, ['repo-gpgcheck']))
gpgcheck = (None if getStrAttribute(i, ['gpgcheck'], default=None) is None
else getBoolAttribute(i, ['gpgcheck']))