pylint/checkers/base.py
def visit_dict(self, node):
        """check duplicate key in dictionary"""
        keys = set()
        for k, _ in node.items:
            if isinstance(k, astroid.Const):
                key = k.value
                if key in keys:
                    self.add_message("duplicate-key", node=node, args=key)
                keys.add(key)
def visit_dict(self, node):
        keys = set()
        for k, _ in node.items:
            if isinstance(k, astroid.Const):
                key = k.value
                if key in keys:
                    self.add_message("duplicate-key", node=node, args=key)
                keys.add(key)
def visit_dict ( self , node ) : keys = set ( ) for k , _ in node . items : if isinstance ( k , astroid . Const ) : key = k . value if key in keys : self . add_message ( "duplicate-key" , node = node , args = key ) keys . add ( key )
check duplicate key in dictionary
check duplicate key in dictionary