Skip to content

Add type hints to blueman.plugins - #1338

Merged
cschramm merged 10 commits into
blueman-project:masterfrom
cschramm:types-plugins
Aug 20, 2020
Merged

Add type hints to blueman.plugins#1338
cschramm merged 10 commits into
blueman-project:masterfrom
cschramm:types-plugins

Conversation

@cschramm

@cschramm cschramm commented Aug 9, 2020

Copy link
Copy Markdown
Member

Depends on #1332

@cschramm
cschramm force-pushed the types-plugins branch 6 times, most recently from c46879b to ad653df Compare August 16, 2020 07:58
@cschramm cschramm mentioned this pull request Aug 18, 2020
@cschramm
cschramm marked this pull request as ready for review August 18, 2020 20:41
@cschramm
cschramm requested a review from infirit August 18, 2020 20:41
@cschramm
cschramm force-pushed the types-plugins branch 2 times, most recently from 2540ce3 to 521f790 Compare August 19, 2020 10:14

@infirit infirit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I skimmed through this and I am really curious what will happen when we proper typehints are available for pygobject :-).

Comment thread blueman/plugins/applet/PowerManager.py
Comment thread blueman/main/Manager.py Outdated
Comment thread blueman/plugins/manager/Services.py Outdated
A GSourceFunc as passed to g_timeout_add is expected to return a boolean. Returning None works fine as PyGObject uses PyObject_IsTrue to convert whatever python object it gets, so that it returns FALSE / G_SOURCE_REMOVE.
* FORCE_HIDE was never actually used, so an indication whether or not to force-show the icon is sufficient.
* BluemanApplet.Manager is always initialized since bd63d53.
...to AppletPlugin and ManagerPlugin.

It is specific to those types and the base class does not have to know anything about it.
Services.on_request_menu_items.add_menu_item expects every Service class to implement them (which is the fact, just not expressed).
The monitor class is always the same
@cschramm
cschramm merged commit 9cb4023 into blueman-project:master Aug 20, 2020
@cschramm
cschramm deleted the types-plugins branch August 20, 2020 16:46
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