<commit_before>export default class Expansion {
    constructor(playground) {
        this.playground = playground;
    }

    banAllExpansionBlock() {
        const { mainWorkspace } = this.playground;
        if (!mainWorkspace) {
            return;
        }

        const blockMenu = _.result(mainWorkspace, 'blockMenu');
        if (!blockMenu) {
            return;
        }

        Object.values(Entry.EXPANSION_BLOCK_LIST).forEach((block) => {
            blockMenu.banClass(block.name, true);
            blockMenu.banClass(`${block.name}_legacy`, true);
        });
    }

    banExpansionBlocks(blockNames = []) {
        if (blockNames.length < 1) {
            return;
        }
        const expansions = Object.keys(Entry.EXPANSION_BLOCK_LIST);
        const blockTypes = blockNames.filter((x) => expansions.includes(x));
        if (blockTypes.length < 1) {
            console.warn('not exist blockType', blockTypes);
            return;
        }
        const currentObjectId = Entry.playground.object.id;
        Entry.do('selectObject', currentObjectId);
        blockTypes.forEach((blockType) => {
            const blocks = Entry.EXPANSION_BLOCK_LIST[blockType].getBlocks();
            Object.keys(blocks).forEach((blockType) => {
                Entry.Utils.removeBlockByType(blockType);
            });
        });
        Entry.do('selectObject', currentObjectId).isPass(true);
        Entry.do('objectRemoveExpansionBlocks', blockNames).isPass(true);
    }
<commit_msg>리뷰 반영.<commit_after>export default class Expansion {
    constructor(playground) {
        this.playground = playground;
    }

    banAllExpansionBlock() {
        const { mainWorkspace } = this.playground;
        if (!mainWorkspace) {
            return;
        }

        const blockMenu = _.result(mainWorkspace, 'blockMenu');
        if (!blockMenu) {
            return;
        }

        Object.values(Entry.EXPANSION_BLOCK_LIST).forEach((block) => {
            blockMenu.banClass(block.name, true);
            blockMenu.banClass(`${block.name}_legacy`, true);
        });
    }

    banExpansionBlocks(blockNames = []) {
        if (!blockNames.length) {
            return;
        }
        const expansions = Object.keys(Entry.EXPANSION_BLOCK_LIST);
        const blockTypes = blockNames.filter((x) => expansions.includes(x));
        if (!blockTypes.length) {
            console.warn('not exist blockType', blockTypes);
            return;
        }
        const currentObjectId = Entry.playground.object.id;
        Entry.do('selectObject', currentObjectId);
        blockTypes.forEach((blockType) => {
            const blocks = Entry.EXPANSION_BLOCK_LIST[blockType].getBlocks();
            Object.keys(blocks).forEach((blockType) => {
                Entry.Utils.removeBlockByType(blockType);
            });
        });
        Entry.do('selectObject', currentObjectId).isPass(true);
        Entry.do('objectRemoveExpansionBlocks', blockNames).isPass(true);
    }

{'fraction_non_alphanumeric': 0.12412177985948478, 'fraction_numerical': 0.0006691201070592171, 'mean_word_length': 2.2324324324324323, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '3673820', 'n_tokens_mistral': 831, 'n_tokens_neox': 814, 'n_words': 121}