<commit_before>package org.python.types;

public class DictKeys extends org.python.types.FrozenSet {
    static {
        org.python.types.Type.declarePythonType(DictKeys.class,"dict_keys",null,null);
    }

    /**
     * A utility method to update the internal value of this object.
     *
     * Used by __i*__ operations to do an in-place operation.
     * obj must be of type org.python.types.FrozenSet
     */
    void setValue(org.python.Object obj) {
        this.value = ((org.python.types.DictKeys) obj).value;
    }

    @Override
    public org.python.Object __hash__() {
        throw new org.python.exceptions.AttributeError(this, "__hash__");
    }

    public DictKeys(org.python.types.Dict dict) {
        this.value = dict.value.keySet();
    }

    /**
     * A utility method to create a set from an iterable object
     * <p>
     * Used by the __and__,__or__,__sub__ and __xor__ operations
     * obj must have a valid iterator
     */
    private java.util.Set<org.python.Object> fromIter(org.python.Object obj) {
        java.util.Set<org.python.Object> generated = new java.util.HashSet<org.python.Object>();
        org.python.Object iterator = org.Python.iter(obj);
        try {
            while (true) {
                org.python.Object next = iterator.__next__();
                generated.add(next);
            }
        } catch (org.python.exceptions.StopIteration si) {
        }
        return generated;
    }

    @org.python.Method(
            __doc__ = "Return repr(self)."
    )
    public org.python.types.Str __repr__() {
        java.lang.StringBuilder buffer = new java.lang.StringBuilder("dict_keys([");
        boolean first = true;
        for(org.python.Object item : this.value) {
            if (first) {
                first = false;
            } else {
                buffer.append(", ");
            }
            buffer.append(String.format("%s",item.__repr__()));
        }
        buffer.append("])");
        return new org.python.types.Str(buffer.toString());
    }

    @org.python.Method(
            __doc__ = "default object formatter"
    )
    public org.python.types.Str __format__(org.python.Object other) {
        throw new org.python.exceptions.NotImplementedError("dict_keys.__format__() has not been implemented.");
    }

    @org.python.Method(
            __doc__ = "__dir__() -> list\ndefault dir() implementation"
    )
    public org.python.types.List __dir__() {
        throw new org.python.exceptions.NotImplementedError("dict_keys.__dir__() has not been implemented.");
    }

    public boolean __setattr_null(java.lang.String name, org.python.Object value) {
        // Builtin types can't have attributes set on them.
        return false;
    }

    public boolean __delattr_null(java.lang.String name) {
        // Can't delete attributes of Builtin types
        return false;
    }

    @org.python.Method(
            __doc__ = "",
            args = {"index"}
    )
    public org.python.Object __getitem__(org.python.Object index) {
        if (index instanceof org.python.types.Int || index instanceof org.python.types.Bool) {
            throw new org.python.exceptions.TypeError("'dict_keys' object does not support indexing");
        } else {
            throw new org.python.exceptions.TypeError("'dict_keys' object is not subscriptable");
        }
    }

    public void __setitem__(org.python.Object item, org.python.Object value) {
        throw new org.python.exceptions.TypeError("'dict_keys' object does not support item assignment");
    }

    public void __delitem__(org.python.Object item) {
        throw new org.python.exceptions.TypeError("'dict_keys' object doesn't support item deletion");
    }

    @org.python.Method(
            __doc__ = ""
    )
    public org.python.Object __invert__() {
        throw new org.python.exceptions.TypeError("bad operand type for unary ~: 'dict_keys'");
    }

    @org.python.Method(
            __doc__ = ""
    )
    public org.python.Object __pos__() {
        throw new org.python.exceptions.TypeError("bad operand type for unary +: 'dict_keys'");
    }

    @org.python.Method(
            __doc__ = ""
    )
    public org.python.Object __neg__() {
        throw new org.python.exceptions.TypeError("bad operand type for unary -: 'dict_keys'");
    }

    @org.python.Method(
            __doc__ = "Return self&value."
    )
    public org.python.types.Set __and__(org.python.Object other) {<commit_msg>Add annotations for __set_item__ and __del_item__<commit_after>package org.python.types;

public class DictKeys extends org.python.types.FrozenSet {
    static {
        org.python.types.Type.declarePythonType(DictKeys.class,"dict_keys",null,null);
    }

    /**
     * A utility method to update the internal value of this object.
     *
     * Used by __i*__ operations to do an in-place operation.
     * obj must be of type org.python.types.FrozenSet
     */
    void setValue(org.python.Object obj) {
        this.value = ((org.python.types.DictKeys) obj).value;
    }

    @Override
    public org.python.Object __hash__() {
        throw new org.python.exceptions.AttributeError(this, "__hash__");
    }

    public DictKeys(org.python.types.Dict dict) {
        this.value = dict.value.keySet();
    }

    /**
     * A utility method to create a set from an iterable object
     * <p>
     * Used by the __and__,__or__,__sub__ and __xor__ operations
     * obj must have a valid iterator
     */
    private java.util.Set<org.python.Object> fromIter(org.python.Object obj) {
        java.util.Set<org.python.Object> generated = new java.util.HashSet<org.python.Object>();
        org.python.Object iterator = org.Python.iter(obj);
        try {
            while (true) {
                org.python.Object next = iterator.__next__();
                generated.add(next);
            }
        } catch (org.python.exceptions.StopIteration si) {
        }
        return generated;
    }

    @org.python.Method(
            __doc__ = "Return repr(self)."
    )
    public org.python.types.Str __repr__() {
        java.lang.StringBuilder buffer = new java.lang.StringBuilder("dict_keys([");
        boolean first = true;
        for(org.python.Object item : this.value) {
            if (first) {
                first = false;
            } else {
                buffer.append(", ");
            }
            buffer.append(String.format("%s",item.__repr__()));
        }
        buffer.append("])");
        return new org.python.types.Str(buffer.toString());
    }

    @org.python.Method(
            __doc__ = "default object formatter"
    )
    public org.python.types.Str __format__(org.python.Object other) {
        throw new org.python.exceptions.NotImplementedError("dict_keys.__format__() has not been implemented.");
    }

    @org.python.Method(
            __doc__ = "__dir__() -> list\ndefault dir() implementation"
    )
    public org.python.types.List __dir__() {
        throw new org.python.exceptions.NotImplementedError("dict_keys.__dir__() has not been implemented.");
    }

    public boolean __setattr_null(java.lang.String name, org.python.Object value) {
        // Builtin types can't have attributes set on them.
        return false;
    }

    public boolean __delattr_null(java.lang.String name) {
        // Can't delete attributes of Builtin types
        return false;
    }

    @org.python.Method(
            __doc__ = "",
            args = {"index"}
    )
    public org.python.Object __getitem__(org.python.Object index) {
        if (index instanceof org.python.types.Int || index instanceof org.python.types.Bool) {
            throw new org.python.exceptions.TypeError("'dict_keys' object does not support indexing");
        } else {
            throw new org.python.exceptions.TypeError("'dict_keys' object is not subscriptable");
        }
    }

    @org.python.Method(
            __doc__ = "",
            args = {"index", "value"}
    )
    public void __setitem__(org.python.Object item, org.python.Object value) {
        throw new org.python.exceptions.TypeError("'dict_keys' object does not support item assignment");
    }

    @org.python.Method(
            __doc__ = "",
            args = {"index"}
    )
    public void __delitem__(org.python.Object item) {
        throw new org.python.exceptions.TypeError("'dict_keys' object doesn't support item deletion");
    }

    @org.python.Method(
            __doc__ = ""
    )
    public org.python.Object __invert__() {
        throw new org.python.exceptions.TypeError("bad operand type for unary ~: 'dict_keys'");
    }

    @org.python.Method(
            __doc__ = ""
    )
    public org.python.Object __pos__() {
        throw new org.python.exceptions.TypeError("bad operand type for unary +: 'dict_keys'");
    }

    @org.python.Method(
            __doc__ = ""
    )
    public org.python.Object __neg__() {
        throw new org.python.exceptions.TypeError("bad operand type for unary -: 'dict_keys'");
    }

    @org.python.Method(
            __doc__ = "Return self&value."
    )
    public org.python.types.Set __and__(org.python.Object other) {
{'fraction_non_alphanumeric': 0.11771778336430211, 'fraction_numerical': 0.0, 'mean_word_length': 2.2620320855614975, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '243291', 'n_tokens_mistral': 2724, 'n_tokens_neox': 2672, 'n_words': 604}