<commit_before>from .utils import do_ex, trace, has_command, _normalized
from .version import meta
try:
    from io import BytesIO
except ImportError:
    from cStringIO import StringIO as BytesIO

from os.path import isfile, join
import subprocess
import sys
from tarfile import TarFile
import warnings

FILES_COMMAND = sys.executable + ' -msetuptools_scm.git'
DEFAULT_DESCRIBE = 'git describe --dirty --tags --long --match *.*'


class GitWorkdir(object):
    """experimental, may change at any time"""
    def __init__(self, path):
        self.path = path

    def do_ex(self, cmd):
        return do_ex(cmd, cwd=self.path)

    @classmethod
    def from_potential_worktree(cls, wd):
        real_wd, _, ret = do_ex('git rev-parse --show-toplevel', wd)
        if ret:
            return
        trace('real root', real_wd)
        if _normalized(real_wd) != _normalized(wd):
            return

        return cls(real_wd)

    def is_dirty(self):
        out, _, _ = self.do_ex("git status --porcelain --untracked-files=no")
        return bool(out)

    def is_shallow(self):<commit_msg>Include a space for readability.<commit_after>from .utils import do_ex, trace, has_command, _normalized
from .version import meta
try:
    from io import BytesIO
except ImportError:
    from cStringIO import StringIO as BytesIO

from os.path import isfile, join
import subprocess
import sys
from tarfile import TarFile
import warnings

FILES_COMMAND = sys.executable + ' -m setuptools_scm.git'
DEFAULT_DESCRIBE = 'git describe --dirty --tags --long --match *.*'


class GitWorkdir(object):
    """experimental, may change at any time"""
    def __init__(self, path):
        self.path = path

    def do_ex(self, cmd):
        return do_ex(cmd, cwd=self.path)

    @classmethod
    def from_potential_worktree(cls, wd):
        real_wd, _, ret = do_ex('git rev-parse --show-toplevel', wd)
        if ret:
            return
        trace('real root', real_wd)
        if _normalized(real_wd) != _normalized(wd):
            return

        return cls(real_wd)

    def is_dirty(self):
        out, _, _ = self.do_ex("git status --porcelain --untracked-files=no")
        return bool(out)

    def is_shallow(self):
{'fraction_non_alphanumeric': 0.10190217391304347, 'fraction_numerical': 0.0, 'mean_word_length': 2.8959435626102294, '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': '1963399', 'n_tokens_mistral': 718, 'n_tokens_neox': 703, 'n_words': 206}