Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bug: pull request simple field labels description schema incorrect #7

Copy link
Copy link
Closed
@tisonkun

Description

@tisonkun
Issue body actions

@yanyongyu There are still some other failures in the schema after #6 fixed. Let me show you the completed code snippet I used:

g = GitHub(TokenAuthStrategy(<My-Personal-Token>))
prs = g.paginate(g.rest.pulls.list, owner='apache', repo='pulsar', state='open')

origins = []
for pr in prs:
    pr: PullRequestSimple
    requested_reviewers = pr.requested_reviewers
    for reviewers in requested_reviewers:
        origins.append((reviewers.login, pr.html_url))

gives:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/homebrew/lib/python3.10/site-packages/githubkit/paginator.py", line 76, in __next__
    contents = self._get_next_page()
  File "/opt/homebrew/lib/python3.10/site-packages/githubkit/paginator.py", line 112, in _get_next_page
    cast(Response[List[RT]], response).parsed_data
  File "/opt/homebrew/lib/python3.10/site-packages/githubkit/response.py", line 50, in parsed_data
    return parse_raw_as(self._data_model, self._response.content)
  File "pydantic/tools.py", line 82, in pydantic.tools.parse_raw_as
  File "pydantic/tools.py", line 38, in pydantic.tools.parse_obj_as
  File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 58 validation errors for ParsingModel[List[githubkit.rest.models.PullRequestSimple]]
__root__ -> 37 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 38 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 40 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 41 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 42 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 43 -> labels -> 1 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 44 -> labels -> 5 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 45 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 46 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 47 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 48 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 49 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 50 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 51 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 52 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 53 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 54 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 55 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 56 -> labels -> 4 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 57 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 58 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 59 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 60 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 61 -> labels -> 1 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 62 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 63 -> labels -> 4 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 64 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 65 -> labels -> 1 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 66 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 67 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 68 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 69 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 70 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 71 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 72 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 73 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 74 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 75 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 76 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 77 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 78 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 79 -> labels -> 4 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 80 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 81 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 82 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 83 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 84 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 85 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 86 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 88 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 89 -> labels -> 1 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 90 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 91 -> labels -> 1 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 92 -> labels -> 3 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 94 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 96 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 97 -> labels -> 2 -> description
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> 99 -> labels -> 1 -> description
  none is not an allowed value (type=type_error.none.not_allowed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Rest APIbugSomething isn't workingSomething isn't workingschemaschema relatedschema related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.