Skip to content

chore: satisfy linting concerns from ruff#145

Merged
tekktrik merged 1 commit intoadafruit:mainfrom
2bndy5:ruff-lint
Jan 29, 2026
Merged

chore: satisfy linting concerns from ruff#145
tekktrik merged 1 commit intoadafruit:mainfrom
2bndy5:ruff-lint

Conversation

@2bndy5
Copy link
Contributor

@2bndy5 2bndy5 commented Jan 27, 2026

@2bndy5 2bndy5 mentioned this pull request Jan 27, 2026
5 tasks
@tekktrik tekktrik self-requested a review January 27, 2026 14:53
Copy link
Contributor Author

@2bndy5 2bndy5 left a comment

Choose a reason for hiding this comment

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

About check=True concern.

Copy link
Member

@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

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

Some minor changes but all of these look good. We could push the line length out but I think this is still fine and readable for now.

@2bndy5
Copy link
Contributor Author

2bndy5 commented Jan 29, 2026

I think the typing concerns would be better addressed using mypy. But the pre-commit config (proposed in #144) does not currently include mypy usage. Would you like another PR to add mypy into the CI (and fix any any typing problems that arise)?

@tekktrik
Copy link
Member

I would separate mypy. I think type annotation here are helpful for the developers, but this isn't intended to be a widely used library - so the work needed for compliance per mypy may not be worth it in that regard. That's likely more true if mypy adherence would require any sort of major overhaul.

@2bndy5
Copy link
Contributor Author

2bndy5 commented Jan 29, 2026

so the work needed for compliance per mypy may not be worth it in that regard

FYI, I spent almost 20 minutes trying to track down the types of the parameters you questioned. Using mypy can avoid wasting that much time.

A quick run of mypy shows that most problems originate from not having type stubs for dependencies. If that result remains persistent, then it would be beneficial for maintainers alone.

Copy link
Member

@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

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

Thanks!

@tekktrik tekktrik merged commit da29af3 into adafruit:main Jan 29, 2026
3 checks passed
@2bndy5 2bndy5 deleted the ruff-lint branch January 29, 2026 01:59
@2bndy5
Copy link
Contributor Author

2bndy5 commented Jan 29, 2026

It turns out that the typing here is much more of a mess than I thought. Honestly addressing the typing errors/warnings would feel like a total rewrite, and, at that point, I would just use rust with a python binding.

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