<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.md', which is part of this source code package.
#

from kubernetes.utils import HttpRequest
from kubernetes.models.v1.BaseUrls import BaseUrls
from kubernetes.models.v1.BaseModel import BaseModel
from kubernetes.models.v1.DeleteOptions import DeleteOptions
from kubernetes.K8sConfig import K8sConfig
from kubernetes.K8sExceptions import *
import json

VALID_K8s_OBJS = [
    'Deployment',
    'Pod',
    'ReplicationController',
    'Secret',
    'Service'
]


class K8sObject(object):

    def __init__(self, config=None, name=None, obj_type=None):

        if config is not None and not isinstance(config, K8sConfig):
            raise SyntaxError('K8sObject: config: [ {0} ] must be of type K8sConfig.'.format(config.__class__.__name__))
        if config is None:
            config = K8sConfig()
        self.config = config

        if name is None:
            raise SyntaxError('K8sObject: name: [ {0} ] cannot be None.'.format(name))
        if not isinstance(name, str):
            raise SyntaxError('K8sObject: name: [ {0} ] must be a string.'.format(name.__class__.__name__))<commit_msg>K8sObject: add 'ReplicaSet' as a valid object<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.md', which is part of this source code package.
#

from kubernetes.utils import HttpRequest
from kubernetes.models.v1.BaseUrls import BaseUrls
from kubernetes.models.v1.BaseModel import BaseModel
from kubernetes.models.v1.DeleteOptions import DeleteOptions
from kubernetes.K8sConfig import K8sConfig
from kubernetes.K8sExceptions import *
import json

VALID_K8s_OBJS = [
    'Deployment',
    'Pod',
    'ReplicaSet',
    'ReplicationController',
    'Secret',
    'Service'
]


class K8sObject(object):

    def __init__(self, config=None, name=None, obj_type=None):

        if config is not None and not isinstance(config, K8sConfig):
            raise SyntaxError('K8sObject: config: [ {0} ] must be of type K8sConfig.'.format(config.__class__.__name__))
        if config is None:
            config = K8sConfig()
        self.config = config

        if name is None:
            raise SyntaxError('K8sObject: name: [ {0} ] cannot be None.'.format(name))
        if not isinstance(name, str):
            raise SyntaxError('K8sObject: name: [ {0} ] must be a string.'.format(name.__class__.__name__))
{'fraction_non_alphanumeric': 0.10418310970797158, 'fraction_numerical': 0.014601420678768745, 'mean_word_length': 3.385813148788927, 'pattern_counts': {'":': 0, '<': 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': '3675201', 'n_tokens_mistral': 792, 'n_tokens_neox': 783, 'n_words': 232}