def get_cache_info(self, options, args): # type: (Values, List[Any]) -> None if args: raise CommandError('Too many arguments') num_http_files = len(self._find_http_files(options)) num_packages = len(self._find_wheels(options, '*')) http_cache_location = self._cache_dir(options, 'http') wheels_cache_location = self._cache_dir(options, 'wheels') http_cache_size = filesystem.format_directory_size(http_cache_location) wheels_cache_size = filesystem.format_directory_size( wheels_cache_location) message = textwrap.dedent(""" Package index page cache location: {http_cache_location} Package index page cache size: {http_cache_size} Number of HTTP files: {num_http_files} Wheels location: {wheels_cache_location} Wheels size: {wheels_cache_size} Number of wheels: {package_count} """).format( http_cache_location=http_cache_location, http_cache_size=http_cache_size, num_http_files=num_http_files, wheels_cache_location=wheels_cache_location, package_count=num_packages, wheels_cache_size=wheels_cache_size, ).strip() logger.info(message)
def get_cache_info(self, options: Values, args: List[Any]) -> None: if args: raise CommandError("Too many arguments") num_http_files = len(self._find_http_files(options)) num_packages = len(self._find_wheels(options, "*")) http_cache_location = self._cache_dir(options, "http") wheels_cache_location = self._cache_dir(options, "wheels") http_cache_size = filesystem.format_directory_size(http_cache_location) wheels_cache_size = filesystem.format_directory_size( wheels_cache_location) message = (textwrap.dedent(""" Package index page cache location: {http_cache_location} Package index page cache size: {http_cache_size} Number of HTTP files: {num_http_files} Locally built wheels location: {wheels_cache_location} Locally built wheels size: {wheels_cache_size} Number of locally built wheels: {package_count} """).format( http_cache_location=http_cache_location, http_cache_size=http_cache_size, num_http_files=num_http_files, wheels_cache_location=wheels_cache_location, package_count=num_packages, wheels_cache_size=wheels_cache_size, ).strip()) logger.info(message)
def get_cache_info(self, options, args): # type: (Values, List[Any]) -> None if args: raise CommandError("Too many arguments") num_packages = len(self._find_wheels(options, "*")) cache_location = self._wheels_cache_dir(options) cache_size = filesystem.format_directory_size(cache_location) message = ( textwrap.dedent( """ Location: {location} Size: {size} Number of wheels: {package_count} """ ) .format( location=cache_location, package_count=num_packages, size=cache_size ) .strip() ) logger.info(message)
def get_cache_dir(self, options, args): # type: (Values, List[Any]) -> None if args: raise CommandError('Too many arguments') logger.info(options.cache_dir) def get_cache_info(self, options, args): # type: (Values, List[Any]) -> None if args: raise CommandError('Too many arguments') num_packages = len(self._find_wheels(options, '*')) cache_location = self._wheels_cache_dir(options) cache_size = filesystem.format_directory_size(cache_location) message = textwrap.dedent(""" Location: {location} Size: {size} Number of wheels: {package_count} """).format( location=cache_location, package_count=num_packages, size=cache_size, ).strip() logger.info(message) def list_cache_items(self, options, args): # type: (Values, List[Any]) -> None
raise CommandError('Too many arguments') logger.info(options.cache_dir) def get_cache_info(self, options, args): # type: (Values, List[Any]) -> None if args: raise CommandError('Too many arguments') <<<<<<< HEAD num_http_files = len(self._find_http_files(options)) num_packages = len(self._find_wheels(options, '*')) http_cache_location = self._cache_dir(options, 'http') wheels_cache_location = self._cache_dir(options, 'wheels') http_cache_size = filesystem.format_directory_size(http_cache_location) wheels_cache_size = filesystem.format_directory_size( wheels_cache_location ) message = textwrap.dedent(""" Package index page cache location: {http_cache_location} Package index page cache size: {http_cache_size} Number of HTTP files: {num_http_files} Wheels location: {wheels_cache_location} Wheels size: {wheels_cache_size} Number of wheels: {package_count} """).format( http_cache_location=http_cache_location, http_cache_size=http_cache_size, num_http_files=num_http_files,