<commit_before>"""Windows PowerShell 6+"""

from rez.shells import Shell
from rez.utils.platform_ import platform_
from rezplugins.shell.powershell import PowerShellBase
from rezplugins.shell.sh import SH


class PowerShellCore(PowerShellBase):

    @property
    def executable(cls):
        if cls._executable is None:
            cls._executable = Shell.find_executable('pwsh')
        return cls._executable

    @classmethod
    def name(cls):
        return 'pwsh'

    @classmethod
    def file_extension(cls):
        return 'ps1'

    @classmethod
    def get_syspaths(cls):
        # TODO: Clean dependency from SH
        if platform_.name == "windows":
            return super(PowerShellCore, cls).get_syspaths()
        else:<commit_msg>Explaining the dependency of pwsh on SH on non-windows platforms.<commit_after>"""Windows PowerShell 6+"""

from rez.shells import Shell
from rez.utils.platform_ import platform_
from rezplugins.shell.powershell import PowerShellBase


class PowerShellCore(PowerShellBase):

    @property
    def executable(cls):
        if cls._executable is None:
            cls._executable = Shell.find_executable('pwsh')
        return cls._executable

    @classmethod
    def name(cls):
        return 'pwsh'

    @classmethod
    def file_extension(cls):
        return 'ps1'

    @classmethod
    def get_syspaths(cls):
        if platform_.name == "windows":
            return super(PowerShellCore, cls).get_syspaths()
        else:
            # TODO: Newer versions of pwsh will parse .profile via sh [1], so
            # we could use a similar technique as SH itself. For now, to
            # support older pwsh version we depend on SH on unix like platforms
            # directly.
            # [1] https://github.com/PowerShell/PowerShell/pull/10050
            from rezplugins.shell.sh import SH
{'fraction_non_alphanumeric': 0.0827027027027027, 'fraction_numerical': 0.005945945945945946, 'mean_word_length': 2.658102766798419, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '1335239', 'n_tokens_mistral': 535, 'n_tokens_neox': 520, 'n_words': 156}