(check_name, file_suffix='.py', abs_file_path=True, include_tests=True, include_dirs=None)
Return generator of filenames from within a given check.

    By default, only includes files within 'datadog_checks' and 'tests' directories, this
    can be expanded by adding to the `include_dirs` arg. 'tests' can also be removed.
Return generator of filenames from within a given check.
Return generator of filenames from within a given check .
def get_check_files(check_name, file_suffix='.py', abs_file_path=True, include_tests=True, include_dirs=None):
    """Return generator of filenames from within a given check.

    By default, only includes files within 'datadog_checks' and 'tests' directories, this
    can be expanded by adding to the `include_dirs` arg. 'tests' can also be removed.
    """
    base_dirs = ['datadog_checks']
    if include_tests:
        base_dirs.append('tests')
    if include_dirs is not None:
        base_dirs += include_dirs

    bases = [os.path.join(get_root(), check_name, base) for base in base_dirs]

    for base in bases:
        for root, _, files in os.walk(base):
            for f in files:
                if f.endswith(file_suffix):
                    if abs_file_path:
                        yield os.path.join(root, f)
                    else:
                        yield f
def get_check_files ( check_name , file_suffix = '.py' , abs_file_path = True , include_tests = True , include_dirs = None ) : base_dirs = [ 'datadog_checks' ] if include_tests : base_dirs . append ( 'tests' ) if include_dirs is not None : base_dirs += include_dirs bases = [ os . path . join ( get_root ( ) , check_name , base ) for base in base_dirs ] for base in bases : for root , _ , files in os . walk ( base ) : for f in files : if f . endswith ( file_suffix ) : if abs_file_path : yield os . path . join ( root , f ) else : yield f