loaders.load_sprites_from_dir()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nop 2
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