- Extract calendar widget creation into helper method (_create_date_calendar_widget) Eliminates ~80 lines of duplicated code between from/to date widgets - Extract place access logic into _get_place_name_for_event() helper Provides single source of truth for place access with error handling - Consolidate year spin button updates via _update_year_spin_button() helper Reduces duplication and ensures consistent behavior - Split _update_filter_dialog_state() into focused methods: - _update_event_type_widgets() - _update_person_filter_widgets() - _update_date_range_widgets() - Extract filter check logic into separate methods: - _apply_event_type_filter() - _apply_category_filter() - Improve type hints: change handler return types from Any to Callable[[Gtk.Widget], None] - Extract UI layout constants (margins, spacing) for better maintainability - Add event type normalization caching for performance Cache dictionary avoids repeated conversions - Optimize event type set operations with pre-computed normalized active types Improves filter performance significantly
Description
MyTimeline Gramps plugin
Languages
Python
94.2%
Shell
5.8%