Skip to content
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

fix: 'flet' has no attribute BottomSheetTheme #3858

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Aug 23, 2024

Description

Fixes #3847

Summary by Sourcery

Fix the attribute error by adding the missing import for BottomSheetTheme in the flet_core package.

Bug Fixes:

  • Fix the missing import of BottomSheetTheme in the flet_core package, resolving the attribute error.

Copy link
Contributor

sourcery-ai bot commented Aug 23, 2024

Reviewer's Guide by Sourcery

This pull request addresses a bug where 'flet' had no attribute 'BottomSheetTheme'. The changes involve minor modifications to the Theme class in the flet-core package and an import addition in the init.py file.

File-Level Changes

Change Details Files
Simplified optional field declarations in the Theme class
  • Removed field() decorator for bottom_navigation_bar_theme
  • Removed field() decorator for floating_action_button_theme
  • Added icon_theme as an optional field
sdk/python/packages/flet-core/src/flet_core/theme.py
Added BottomSheetTheme to the imports in init.py
  • Imported BottomSheetTheme in the init.py file
sdk/python/packages/flet-core/src/flet_core/__init__.py

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ndonkoHenri - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@ndonkoHenri
Copy link
Contributor Author

@FeodorFitsner, do you think we should set a default factory for all the theme-props in the Theme class?
Some props have it and some don't... (bias?)

@FeodorFitsner FeodorFitsner merged commit a9ccdf6 into main Aug 27, 2024
3 checks passed
@FeodorFitsner FeodorFitsner deleted the fix-bottom-sheet-theme branch August 27, 2024 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: module 'flet' has no attribute 'BottomSheetTheme'. Did you mean: 'BottomSheet'?
2 participants