Skip to content

brain_gi: magic methods are not recognized for Gtk objects #728

@lovetox

Description

@lovetox

Steps to reproduce

from gi.repository import Gtk

model = Gtk.ListStore(str)
model.append(["asd"])
a = model[0][0]
print(a)

See also https://gitlab.gnome.org/GNOME/pygobject/issues/361

Current behavior

This yields E1136: Value 'model' is unsubscriptable (unsubscriptable-object)

This is a false positive, the ListStore Widget implements __setitem__()

Version

pylint 2.4.4
astroid 2.3.3
Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions