def _scan_file(filename, sentinel, source_type='import'):
    filename = os.path.abspath(filename)
    real_filename = os.path.realpath(filename)

    if os.path.getsize(filename) <= max_file_size:
        if real_filename not in sentinel and os.path.isfile(filename):
            sentinel.add(real_filename)

            basename = os.path.basename(filename)
            scope, imports = ast_scan_file(filename)

            if scope is not None and imports is not None:
                for imp in imports:
                    yield (source_type, imp.module, None)

                if 'INSTALLED_APPS' in scope and basename == 'settings.py':
                    log.info('Found Django settings: %s', filename)
                    for item in django.handle_django_settings(filename):
                        yield item
            else:
                log.warn('Could not scan imports from: %s', filename)
    else:
        log.warn('File size too large: %s', filename)
Use of --bounds results in a warning from the 1.0 future.
dataset/ETHPy150Open tweekmonster/moult/moult/filesystem_scanner.py/_scan_file--crossover with--dataset/ETHPy150Open mapbox/rasterio/tests/test_rio_warp.py/test_warp_reproject_bounds_res_future_warning