Skip to content

python: remove unused buffer #1287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

syundo0730
Copy link
Contributor

@syundo0730 syundo0730 commented Dec 8, 2024

Changelog

None

Docs

None

Description

In the Python implementation of ChunkBuilder.reset(), the self.buffer object is recreated but never actually referenced. This PR removes the unused self.buffer variable to simplify the code.

I manually ran the following examples without encountering any errors:

python3 python/examples/jsonschema/pointcloud_csv_to_mcap.py python/examples/jsonschema/bus.csv
python3 python/examples/protobuf/image_example.py ptoro_image.mcap
python3 python/examples/protobuf/writer.py proto.mcap
python3 python/examples/raw/writer.py raw.mcap

Additionally, I ran:

mcap doctor out.mcap
mcap doctor ptoro_image.mcap
mcap doctor proto.mcap
mcap doctor raw.mcap

All checks passed without issues.

Copy link
Contributor

@indirectlylit indirectlylit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks correct - thank you!

@indirectlylit indirectlylit merged commit a3b6880 into foxglove:main Dec 9, 2024
23 checks passed
@syundo0730 syundo0730 deleted the remove-unused-buffer branch December 10, 2024 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants