Skip to content

Commit

Permalink
Fix PyGI warnings about enums
Browse files Browse the repository at this point in the history
Fixes

    ** (gtimelog:329385): WARNING **: 15:20:47.851: expected enumeration type void, but got PyGLibOptionArg instead

    ** (gtimelog:329385): WARNING **: 15:20:47.852: expected enumeration type void, but got PyGLibOptionArg instead

    ** (gtimelog:329385): WARNING **: 15:20:47.852: expected enumeration type void, but got PyGLibOptionArg instead

    ** (gtimelog:329385): WARNING **: 15:20:47.852: expected enumeration type void, but got PyGLibOptionArg instead

Closes #249.
  • Loading branch information
mgedmin committed Jan 30, 2024
1 parent 2048724 commit e9fcae0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gtimelog/main.py
Expand Up @@ -163,7 +163,8 @@ def make_option(long_name, short_name=None, flags=0, arg=GLib.OptionArg.NONE,
option.long_name = long_name.lstrip('-')
option.short_name = 0 if not short_name else short_name.lstrip('-')
option.flags = flags
option.arg = arg
# Not 100% sure about the int(), but it fixes a warning from PyGI
option.arg = int(arg)
option.arg_data = arg_data
option.description = description
option.arg_description = arg_description
Expand Down

0 comments on commit e9fcae0

Please sign in to comment.