Skip to content

Fix ruff SIM108 lint error in conftest.py#350

Merged
shaypal5 merged 2 commits intotesting-improvementsfrom
copilot/sub-pr-349
Feb 28, 2026
Merged

Fix ruff SIM108 lint error in conftest.py#350
shaypal5 merged 2 commits intotesting-improvementsfrom
copilot/sub-pr-349

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

Pre-commit CI was failing due to a ruff SIM108 violation in tests/conftest.py.

Change

  • Replaced if/else block with a ternary expression for cache_dir assignment:
# Before
if worker_id == "master":
    cache_dir = tmp_path / "cachier_cache"
else:
    cache_dir = tmp_path / f"cachier_cache_{worker_id}"

# After
cache_dir = tmp_path / "cachier_cache" if worker_id == "master" else tmp_path / f"cachier_cache_{worker_id}"

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: shaypal5 <917954+shaypal5@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix precommit-ci errors for parallel testing Fix ruff SIM108 lint error in conftest.py Feb 28, 2026
@shaypal5 shaypal5 marked this pull request as ready for review February 28, 2026 21:15
@shaypal5 shaypal5 self-requested a review as a code owner February 28, 2026 21:15
@shaypal5 shaypal5 merged commit 1c0cb37 into testing-improvements Feb 28, 2026
1 check passed
@shaypal5 shaypal5 deleted the copilot/sub-pr-349 branch February 28, 2026 21:16
shaypal5 added a commit that referenced this pull request Mar 1, 2026
* Initial plan

* Fix SIM108: use ternary operator for cache_dir assignment in conftest.py

Co-authored-by: shaypal5 <917954+shaypal5@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: shaypal5 <917954+shaypal5@users.noreply.github.com>
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