mergin/merginproject.py
def ignore_file(self, file):
        """
        Helper function for blacklisting certain types of files.

        :param file: file path in project
        :type file: str
        :returns: whether file should be ignored
        :rtype: bool
        """
        ignore_ext = re.compile(r'({})$'.format('|'.join(re.escape(x) for x in ['-shm', '-wal', '~', 'pyc', 'swap'])))
        ignore_files = ['.DS_Store', '.directory']
        name, ext = os.path.splitext(file)
        if ext and ignore_ext.search(ext):
            return True
        if file in ignore_files:
            return True
        return False

        Helper function for blacklisting certain types of files.

        :param file: file path in project
        :type file: str
        :returns: whether file should be ignored
        :rtype: bool
        
Helper function for blacklisting certain types of files.
Helper function for blacklisting certain types of files .
def ignore_file(self, file):
        ignore_ext = re.compile(r'({})$'.format('|'.join(re.escape(x) for x in ['-shm', '-wal', '~', 'pyc', 'swap'])))
        ignore_files = ['.DS_Store', '.directory']
        name, ext = os.path.splitext(file)
        if ext and ignore_ext.search(ext):
            return True
        if file in ignore_files:
            return True
        return False
def ignore_file ( self , file ) : ignore_ext = re . compile ( r'({})$' . format ( '|' . join ( re . escape ( x ) for x in [ '-shm' , '-wal' , '~' , 'pyc' , 'swap' ] ) ) ) ignore_files = [ '.DS_Store' , '.directory' ] name , ext = os . path . splitext ( file ) if ext and ignore_ext . search ( ext ) : return True if file in ignore_files : return True return False
Helper function for blacklisting certain types of files.
Helper function for blacklisting certain types of files .
"""
        Helper function for blacklisting certain types of files.

        :param file: file path in project
        :type file: str
        :returns: whether file should be ignored
        :rtype: bool
        """
whether file should be ignored
whether file should be ignored
bool
self
file
file path in project
file path in project