refactor(bar): rename 'thick' field to 'thick_bars' for clarity#514
Merged
palewire merged 1 commit intochekos:mainfrom Nov 15, 2025
Merged
refactor(bar): rename 'thick' field to 'thick_bars' for clarity#514palewire merged 1 commit intochekos:mainfrom
palewire merged 1 commit intochekos:mainfrom
Conversation
Renamed the `thick` field to `thick_bars` in the BarChart class to improve code readability and make the field name more descriptive. The field still uses "thick" as an alias to maintain backward compatibility with the API. Changes: - Renamed field from `thick` to `thick_bars` in BarChart model - Updated all references in serialization and deserialization methods - Updated test assertions to use new field name This change makes the codebase more maintainable by using a more explicit field name while preserving the existing API contract through aliasing.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the BarChart class by renaming the internal field from thick to thick_bars to improve code clarity and maintainability. The field uses "thick" as an alias to preserve backward compatibility with the Datawrapper API. All references in serialization, deserialization, and tests have been updated to use the new field name.
Key Changes
- Renamed internal field from
thicktothick_barsin theBarChartmodel definition - Updated serialization method to use
self.thick_barswhile maintaining"thick"as the API key - Updated deserialization method to populate
thick_barsfrom the API's"thick"field - Updated test assertions across integration and functional test files to reference
thick_bars
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| datawrapper/charts/bar.py | Renamed field definition from thick to thick_bars with alias preservation, and updated serialization/deserialization methods |
| tests/integration/test_chart_get_method.py | Updated assertion to use thick_bars field name |
| tests/functional/test_end_to_end.py | Updated chart initialization and assertions to use thick_bars field name |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renamed the
thickfield tothick_barsin the BarChart class to improve code readability and make the field name more descriptive. The field still uses "thick" as an alias to maintain backward compatibility with the API.Changes:
thicktothick_barsin BarChart modelThis change makes the codebase more maintainable by using a more explicit field name while preserving the existing API contract through aliasing.