Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates configuration expectations to use the [storage] section with a directory key, and removes the Ruff SLF001 ignore by eliminating private-member access in tests and promoting a previously-private version helper to a public API.
Changes:
- Update config-related tests and fixtures to use
[storage].directoryinstead of the legacy[test].testtype. - Rename
constants._get_version()toconstants.get_version()and update call sites. - Enable Ruff
SLF001by removing it from the ignore list and adjusting tests to avoid private member access.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_constants.py | Updates tests to call constants.get_version() after the helper rename. |
| tests/test_config.py | Validates config reading via the public Config().directory property and writes [storage].directory in the default config test. |
| tests/test_config_file_option.py | Removes assertions that access Mackup._config directly to comply with SLF001. |
| tests/fixtures/xdg-config-home/mackup/mackup.cfg | Updates fixture config format to [storage].directory. |
| tests/fixtures/mackup-envarcheck.cfg | Updates fixture config format to [storage].directory. |
| src/mackup/constants.py | Renames _get_version() to get_version() and updates VERSION initialization. |
| pyproject.toml | Removes SLF001 from Ruff ignore list (enables the rule). |
💡 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.
This pull request updates the configuration handling in the codebase to use a
[storage]section anddirectorykey, improves test clarity, and makes some minor code quality improvements.