Skip to content

Conversation

@Thesacraft
Copy link
Collaborator

Hi,
I removed the Warning that is shown in the console that occurs when Tagstudio is opened and a thumbnail is clicked for the first time.

Bug:
grafik

Fix:
Check if provided callback function is actually a Callable and preventing it from trying to disconnect when the callback is None.

@CyanVoxel CyanVoxel added Type: Bug Something isn't working as intended Priority: Low Doesn't require immediate attention labels Nov 29, 2024
Copy link
Member

@CyanVoxel CyanVoxel left a comment

Choose a reason for hiding this comment

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

Looks pretty good! The only suggestion I have is that inside QPushButtonWrapper, self.remove_button.is_connected is still set to False by default despite it no longer being used as a boolean value. If this value is now dependent on it containing a callable or not, I would suggest changing this line to self.is_connected: callable | None = None

@CyanVoxel CyanVoxel self-assigned this Nov 29, 2024
@Thesacraft
Copy link
Collaborator Author

Thesacraft commented Nov 30, 2024

Hi, callable is an inbuilt function that should return True if it's a callable that's passed in and otherwise returns false from what I know. So it should still be a boolean i think.

@CyanVoxel CyanVoxel merged commit dffa363 into TagStudioDev:main Nov 30, 2024
5 checks passed
yedpodtrzitko pushed a commit to yedpodtrzitko/TagStudio that referenced this pull request Dec 2, 2024
* fix: cannot disconnect from None Warning

* fix: cannot disconnect from None Warning mypy compliant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Low Doesn't require immediate attention Type: Bug Something isn't working as intended

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants