Skip to content

Conversation

@yedpodtrzitko
Copy link
Contributor

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
Contributor 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 Type: Tests Tests or testing related label May 13, 2024
@CyanVoxel
Copy link
Member

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

@yedpodtrzitko
Copy link
Contributor Author

@CyanVoxel please go ahead, thanks.

@CyanVoxel CyanVoxel merged commit c09f50c into TagStudioDev:main May 16, 2024
@yedpodtrzitko yedpodtrzitko deleted the yed/mypy-check branch November 18, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Tests Tests or testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants