microsoftgraph / microsoftgraph/msgraph-sdk-python

Type mismatch: ParseNode.get_object_value(Parsable)

Open
#402 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
630
Forks
96
Avg merge
15h 20m
Merged PRs (30d)
3

Description

ParseNode.get_object_value(Parsable) expects its arg to be of type Parsable. When you however pass to it ConnectionOperation.create_from_discriminator_value() which returns an instance of ConnectionOperation which inherits from Entity which inherits from Parsable, you get an error saying that ConnectionOperation is not compatible with Parsable.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing ParseNode.get_object_value(Parsable) and ConnectionOperation.create_from_discriminator_value() through the SDK's type definitions. Reproduce the reported type-checking error and identify the relevant inheritance declarations; done means the valid ConnectionOperation usage is accepted as Parsable without introducing an incompatible type.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.