<commit_before>from enum import Enum

from graphql import graphql_sync
from graphql.type import (
    GraphQLArgument,
    GraphQLBoolean,
    GraphQLEnumType,
    GraphQLEnumValue,
    GraphQLField,
    GraphQLInt,
    GraphQLObjectType,
    GraphQLSchema,
    GraphQLString,
)
from graphql.utilities import introspection_from_schema

ColorType = GraphQLEnumType("Color", values={"RED": 0, "GREEN": 1, "BLUE": 2})


class ColorTypeEnumValues(Enum):
    RED = 0
    GREEN = 1
    BLUE = 2


class Complex1:
    # noinspection PyMethodMayBeStatic
    def some_random_function(self):
        return {}


class Complex2:
    some_random_value = 123


complex1 = Complex1()
complex2 = Complex2()

ComplexEnum = GraphQLEnumType("Complex", {"ONE": complex1, "TWO": complex2})

ColorType2 = GraphQLEnumType("Color", ColorTypeEnumValues)

QueryType = GraphQLObjectType(
    "Query",
    {
        "colorEnum": GraphQLField(
            ColorType,
            args={
                "fromEnum": GraphQLArgument(ColorType),
                "fromInt": GraphQLArgument(GraphQLInt),
                "fromString": GraphQLArgument(GraphQLString),
            },
            resolve=lambda value, info, **args: args.get("fromInt")
            or args.get("fromString")<commit_msg>Mirror minor change in test<commit_after>from enum import Enum

from graphql import graphql_sync
from graphql.type import (
    GraphQLArgument,
    GraphQLBoolean,
    GraphQLEnumType,
    GraphQLEnumValue,
    GraphQLField,
    GraphQLInt,
    GraphQLObjectType,
    GraphQLSchema,
    GraphQLString,
)
from graphql.utilities import introspection_from_schema

ColorType = GraphQLEnumType("Color", values={"RED": 0, "GREEN": 1, "BLUE": 2})


class ColorTypeEnumValues(Enum):
    RED = 0
    GREEN = 1
    BLUE = 2


class Complex1:
    # noinspection PyMethodMayBeStatic
    def some_random_function(self):
        return None


class Complex2:
    some_random_value = 123


complex1 = Complex1()
complex2 = Complex2()

ComplexEnum = GraphQLEnumType("Complex", {"ONE": complex1, "TWO": complex2})

ColorType2 = GraphQLEnumType("Color", ColorTypeEnumValues)

QueryType = GraphQLObjectType(
    "Query",
    {
        "colorEnum": GraphQLField(
            ColorType,
            args={
                "fromEnum": GraphQLArgument(ColorType),
                "fromInt": GraphQLArgument(GraphQLInt),
                "fromString": GraphQLArgument(GraphQLString),
            },
            resolve=lambda value, info, **args: args.get("fromInt")
            or args.get("fromString")
{'fraction_non_alphanumeric': 0.09905660377358491, 'fraction_numerical': 0.014150943396226415, 'mean_word_length': 3.0982286634460547, 'pattern_counts': {'":': 18, '<': 3, '<?xml version=': 0, '>': 3, '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': '5865924', 'n_tokens_mistral': 804, 'n_tokens_neox': 768, 'n_words': 172}