Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add mypy check #161

Merged
merged 3 commits into from May 16, 2024
Merged

Conversation

yedpodtrzitko
Copy link
Collaborator

This add another automatic check beside ruff.

For example in #156 it caught all the errors with wrong method names like isfile()/is_file(), eg. #156 (comment)

This might hurt a bit occasionally, because sometime it will give false positives, but generally it should prevent various errors slipping through, and it's super useful when doing bigger refactorings.

The configuration is now set to slightly permissive mode to keep the diff small-ish. When the pipeline will be in place, we can keep making it more strict.

Comment on lines 286 to 287
and self.filename.lower() == __value.filename.lower() # type: ignore
and self.path.lower() == __value.path.lower() # type: ignore
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

looking at this, I'm not convinced this has ever worked, because this object looks like it doesnt have .filename nor .path property 🤔

@yedpodtrzitko yedpodtrzitko force-pushed the yed/mypy-check branch 2 times, most recently from 12056c7 to ffbb65e Compare May 11, 2024 13:49
@CyanVoxel CyanVoxel added the tests Tests or test workflows label May 13, 2024
@CyanVoxel
Copy link
Member

I'm ready to pull this if you're all set

@yedpodtrzitko
Copy link
Collaborator Author

@CyanVoxel please go ahead, thanks.

@CyanVoxel CyanVoxel merged commit c09f50c into TagStudioDev:main May 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests or test workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants