Few fixes to brain_gi (#3117)

* brain_gi: correctly mark static methods, discovering zero value of enum.IntFlag

Do not register static methods as plain methods, as then pylint expects 'self'
argument to be provided. This handles both statis methods and class
methods in practice.

GLib types often include also named 0 value in flag enums, which results
in bettter self-documenting code than open-coded 0 in flag fields. But,
enum.IntFlag doesn't enumerat that value (even when explicit
enum.IntFlag.NAME works). Handle this special case when enumerating
constants. Wrap it to ignore TypeError, as some GFlags do not specify
names.
2 files changed