python stub for pack has incorrect type

Open Beginner friendly
#9,057 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp, python
Domain
tooling

Research direction

Start in src/idl_gen_python.cpp at the Pack stub-generation code around the linked line, and compare its declared return type with the value returned through End. Update the generated Python stub so Pack has the correct integer return type, then run the relevant Python stub-generation tests or generated-output checks to confirm the annotation.

Written by the indexing model from the issue text.

Description

The stub generator for the Pack function https://github.com/google/flatbuffers/blob/bab10754d93d74d1ff44d46de63558bc4127f7d8/src/idl_gen_python.cpp#L382 says Pack returns None, but it returns an integer since it returns the value from end End function which is an int (aka uoffset).

Dominant language
C++
Stars
26.5k
Forks
3.7k
PR merge metrics
No merged PRs in 30d

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.

More from google/flatbuffers

All issues in google/flatbuffers

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.