loaders   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A load_sprites_from_dir() 0 7 1
1
from typing import Tuple, List
2
3
import pygame
4
5
6
def load_sprites_from_dir(
7
    directory: str, file_list: Tuple[str, ...]
8
) -> List[pygame.Surface]:
9
    """Return a dictionary of the map sprites from a given directory."""
10
    return [
11
        pygame.image.load(f'{directory}/{file_name}.png')
12
        for file_name in file_list
13
    ]
14