Skip to content

Enable SLF001 - #2196

Merged
lra merged 3 commits into
masterfrom
rm_SLF001
Jun 14, 2026
Merged

lra merged 3 commits into
masterfrom
rm_SLF001

Conversation

@lra

@lra lra commented Jun 14, 2026

Copy link
Copy Markdown
Owner

This pull request updates the configuration handling in the codebase to use a [storage] section and directory key, improves test clarity, and makes some minor code quality improvements.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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].directory instead of the legacy [test].testtype.
  • Rename constants._get_version() to constants.get_version() and update call sites.
  • Enable Ruff SLF001 by 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.

Comment thread tests/test_config.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@lra
lra merged commit 9afd899 into master Jun 14, 2026
33 checks passed
@lra
lra deleted the rm_SLF001 branch June 14, 2026 23:39
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