Skip to content

Conversation

@rwb27
Copy link
Collaborator

@rwb27 rwb27 commented Jan 12, 2026

This updates test and example code to use a _set_ prefix on setters as standard. I think this is a trivial change but follows best practice.

I noticed there's now a broken unit test on Windows, which I'll fix separately. I hope the tests will still all pass in CI.

This updates test and example code to use a `_set_` prefix on setters as standard.
@rwb27 rwb27 requested a review from julianstirling January 12, 2026 15:13
Copy link
Contributor

@julianstirling julianstirling left a comment

Choose a reason for hiding this comment

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

Looks good. The clarification in the docs is very clear. Thanks for this!

@julianstirling
Copy link
Contributor

I see that that mypy has found an unused ignore?

I changed the name of a property setter that was deliberately the same as the getter. This reverts that change so mypy passes again.
@barecheck
Copy link

barecheck bot commented Jan 12, 2026

Barecheck - Code coverage report

Total: 96.3%

Your code coverage diff: -0.03% ▾

Uncovered files and lines
FileLines
src/labthings_fastapi/properties.py689, 693, 716-719, 791, 810, 943

@rwb27 rwb27 changed the title User a _set_ prefix on property setters. Use a _set_ prefix on property setters. Jan 12, 2026
@rwb27
Copy link
Collaborator Author

rwb27 commented Jan 12, 2026

Thanks - that was me being overzealous, I've reverted teh offending line.

@rwb27 rwb27 merged commit 3a8921e into main Jan 12, 2026
13 of 14 checks passed
@rwb27 rwb27 deleted the prefix-setters-with-set branch January 12, 2026 16:30
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.

3 participants