<commit_before>import os
import os.path
import logging

from typing import Callable

"""
These are symbolic links used for locks in standard users directories
"""
standard_exceptions = {
    'lock',  # firefox lock, $HOME/.mozilla/firefox/[XXX].default/lock
    'SingletonCookie',  # chrome lock, /home/mark/.config/google-chrome/SingletonCookie
    'SingletonLock',  # chrome lock, /home/mark/.config/google-chrome/SingletonLock
    'SingletonSocket',  # chrome lock, /home/mark/.config/google-chrome/SingletonSocket
}



def remove_bad_symlinks(
        folder: str=None,
        use_standard_exceptions: bool=True,
        onerror: Callable=None) -> None:
    """
    remove bad symbolic links from a folder.
    
    Control this functions verbosity using the python logging framework
    :param folder: <commit_msg>fixed pycharm warnings<commit_after>import os
import os.path
import logging

from typing import Callable

"""
These are symbolic links used for locks in standard users directories
"""
standard_exceptions = {
    'lock',  # firefox lock, $HOME/.mozilla/firefox/[XXX].default/lock
    'SingletonCookie',  # chrome lock, /home/mark/.config/google-chrome/SingletonCookie
    'SingletonLock',  # chrome lock, /home/mark/.config/google-chrome/SingletonLock
    'SingletonSocket',  # chrome lock, /home/mark/.config/google-chrome/SingletonSocket
}


def remove_bad_symlinks(
        folder: str=None,
        use_standard_exceptions: bool=True,
        onerror: Callable=None) -> None:
    """
    remove bad symbolic links from a folder.
    
    Control this functions verbosity using the python logging framework
    :param folder: 
{'fraction_non_alphanumeric': 0.09951456310679611, 'fraction_numerical': 0.0, 'mean_word_length': 3.65819209039548, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4518528', 'n_tokens_mistral': 487, 'n_tokens_neox': 463, 'n_words': 132}