<commit_before>import sublime


class GitSavvySettings:
    def __init__(self, parent=None):
        self.parent = parent
        self.global_settings = sublime.load_settings("GitSavvy.sublime-settings")

    def get(self, key, default=None):
        window = sublime.active_window()
        view = window.active_view()
        project_savvy_settings = view.settings().get("GitSavvy", {})

        if key in project_savvy_settings:
            return project_savvy_settings[key]<commit_msg>Fix: check the nullness of project_savvy_settings (#1013)<commit_after>import sublime


class GitSavvySettings:
    def __init__(self, parent=None):
        self.parent = parent
        self.global_settings = sublime.load_settings("GitSavvy.sublime-settings")

    def get(self, key, default=None):
        window = sublime.active_window()
        view = window.active_view()
        project_savvy_settings = view.settings().get("GitSavvy", {}) or {}

        if key in project_savvy_settings:
            return project_savvy_settings[key]
{'fraction_non_alphanumeric': 0.10097087378640776, 'fraction_numerical': 0.003883495145631068, 'mean_word_length': 3.3872340425531915, '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': '5783820', 'n_tokens_mistral': 332, 'n_tokens_neox': 300, 'n_words': 60}