Skip to content

Make name a non-optional str with a sensible default#96

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-name-attribute-to-butterbackup-configs
Draft

Make name a non-optional str with a sensible default#96
Copilot wants to merge 2 commits intomainfrom
copilot/add-name-attribute-to-butterbackup-configs

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 25, 2026

name: str with no default caused mypy to treat it as a required constructor argument, breaking the 4 call sites that omit it and rely on the model_validator to populate it from UUID.

Changes

  • config_parser.py: Set name: str = "" — keeps the str type, adds an empty-string default so mypy is satisfied. The existing model_validator(mode="before") already replaces falsy values (including "") with the UUID string, so runtime behaviour is unchanged.
# Before
name: str

# After
name: str = ""

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Add name attribute to ButterBackup configurations Add name attribute to backup configurations, defaulting to UUID Mar 25, 2026
Copilot AI requested a review from MaxG87 March 25, 2026 11:05
Copilot stopped work on behalf of MaxG87 due to an error March 25, 2026 14:17
Copilot AI changed the title Add name attribute to backup configurations, defaulting to UUID Make name a required str field in BaseConfig Mar 25, 2026
Copilot AI changed the title Make name a required str field in BaseConfig Make name a non-optional str with a sensible default Mar 25, 2026
@MaxG87 MaxG87 force-pushed the copilot/add-name-attribute-to-butterbackup-configs branch from 12fb57b to ee04fb9 Compare March 25, 2026 14:57
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.

2 participants