autolint/autolint.py
def __classify_files(self, files):
        """Classify a list of files into languages.

        The classification is against the patterns included in the
        configuration file per language. Unix filename pattern matching will
        be applied to the path of the file.

        :param files, an iterable of files to be classified.

        :return a dict with an entry per each language found in the directory,
                excluding ignore files specified. Each entry includes a list of
                files to be linted.
                ex. {'c':['src/main.c', 'src/include.h'], 'js':['src/main.js']}
        """

        ret = {}
        try:
            for lang, conf in self.configuration_dict['langs'].items():
                ret[lang] = set()
                for pattern in conf['include']:
                    ret[lang].update(
                        [f for f in files if fnmatch.fnmatch(f, pattern)])
                if not ret[lang]:
                    del ret[lang]

        except KeyError as e:
            raise AutoLintConfError(("Configuration file, key %s not found"
                                     % e.args[0]))

        return ret
Classify a list of files into languages.

        The classification is against the patterns included in the
        configuration file per language. Unix filename pattern matching will
        be applied to the path of the file.

        :param files, an iterable of files to be classified.

        :return a dict with an entry per each language found in the directory,
                excluding ignore files specified. Each entry includes a list of
                files to be linted.
                ex. {'c':['src/main.c', 'src/include.h'], 'js':['src/main.js']}
        
Classify a list of files into languages.
The classification is against the patterns included in the
configuration file per language. Unix filename pattern matching will
be applied to the path of the file.

:param files, an iterable of files to be classified.

:return a dict with an entry per each language found in the directory,
excluding ignore files specified. Each entry includes a list of
files to be linted.
ex.
Classify a list of files into languages . The classification is against the patterns included in the configuration file per language . Unix filename pattern matching will be applied to the path of the file . : param files an iterable of files to be classified . : return a dict with an entry per each language found in the directory excluding ignore files specified . Each entry includes a list of files to be linted . ex .
def __classify_files(self, files):
        ret = {}
        try:
            for lang, conf in self.configuration_dict['langs'].items():
                ret[lang] = set()
                for pattern in conf['include']:
                    ret[lang].update(
                        [f for f in files if fnmatch.fnmatch(f, pattern)])
                if not ret[lang]:
                    del ret[lang]
        except KeyError as e:
            raise AutoLintConfError(("Configuration file, key %s not found"
                                     % e.args[0]))
        return ret
def __classify_files ( self , files ) : ret = { } try : for lang , conf in self . configuration_dict [ 'langs' ] . items ( ) : ret [ lang ] = set ( ) for pattern in conf [ 'include' ] : ret [ lang ] . update ( [ f for f in files if fnmatch . fnmatch ( f , pattern ) ] ) if not ret [ lang ] : del ret [ lang ] except KeyError as e : raise AutoLintConfError ( ( "Configuration file, key %s not found" % e . args [ 0 ] ) ) return ret
Classify a list of files into languages.
Classify a list of files into languages .
"""Classify a list of files into languages.

        The classification is against the patterns included in the
        configuration file per language. Unix filename pattern matching will
        be applied to the path of the file.

        :param files, an iterable of files to be classified.

        :return a dict with an entry per each language found in the directory,
                excluding ignore files specified. Each entry includes a list of
                files to be linted.
                ex. {'c':['src/main.c', 'src/include.h'], 'js':['src/main.js']}
        """
self
files