async def fetch_data(self) -> IssuesPulls:
    'Get the latest data from GitHub.'
    base_issue_response = (await self._client.repos.issues.list(self.repository, **{'params': {'per_page': 1}}))
    pull_response = (await self._client.repos.pulls.list(self.repository, **{'params': {'per_page': 1}}))
    pulls_count = (pull_response.last_page_number or 0)
    issues_count = ((base_issue_response.last_page_number or 0) - pulls_count)
    issue_last = (base_issue_response.data[0] if (issues_count != 0) else None)
    if ((issue_last is not None) and issue_last.pull_request):
        issue_response = (await self._client.repos.issues.list(self.repository))
        for issue in issue_response.data:
            if (not issue.pull_request):
                issue_last = issue
                break
    return IssuesPulls(issues_count=issues_count, issue_last=issue_last, pulls_count=pulls_count, pull_last=(pull_response.data[0] if (pulls_count != 0) else None))
Get the latest data from GitHub.
async def fetch_data(self) -> IssuesPulls:
    
    base_issue_response = (await self._client.repos.issues.list(self.repository, **{'params': {'per_page': 1}}))
    pull_response = (await self._client.repos.pulls.list(self.repository, **{'params': {'per_page': 1}}))
    pulls_count = (pull_response.last_page_number or 0)
    issues_count = ((base_issue_response.last_page_number or 0) - pulls_count)
    issue_last = (base_issue_response.data[0] if (issues_count != 0) else None)
    if ((issue_last is not None) and issue_last.pull_request):
        issue_response = (await self._client.repos.issues.list(self.repository))
        for issue in issue_response.data:
            if (not issue.pull_request):
                issue_last = issue
                break
    return IssuesPulls(issues_count=issues_count, issue_last=issue_last, pulls_count=pulls_count, pull_last=(pull_response.data[0] if (pulls_count != 0) else None))