<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.K8sVolume import K8sVolume
from kubernetes.K8sExceptions import AlreadyExistsException, UnprocessableEntityException
from kubernetes.models.v1.BaseModel import BaseModel
from kubernetes.models.v1.Container import Container


class PodSpec(BaseModel):
    def __init__(self, name=None, image=None, model=None, pull_secret=None):
        BaseModel.__init__(self)
        self.containers = list()

        if model is not None:
            assert isinstance(model, dict)

            if 'status' in self.model:
                self.model.pop('status', None)
<commit_msg>PodSpec: change assert to exception<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.K8sVolume import K8sVolume
from kubernetes.K8sExceptions import AlreadyExistsException, UnprocessableEntityException
from kubernetes.models.v1.BaseModel import BaseModel
from kubernetes.models.v1.Container import Container


class PodSpec(BaseModel):
    def __init__(self, name=None, image=None, model=None, pull_secret=None):
        BaseModel.__init__(self)
        self.containers = list()

        if model is not None:
            if not isinstance(model, dict):
                raise SyntaxError('PodSpec: model: [ {0} ] must be a dict.'.format(model.__class__.__name__))

            if 'status' in self.model:
                self.model.pop('status', None)

{'fraction_non_alphanumeric': 0.09495548961424333, 'fraction_numerical': 0.00771513353115727, 'mean_word_length': 3.4368421052631577, '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': '7636049', 'n_tokens_mistral': 488, 'n_tokens_neox': 474, 'n_words': 147}