File: util.py

package info (click to toggle)
python-acme 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 660 kB
  • sloc: python: 3,895; makefile: 173
file content (10 lines) | stat: -rw-r--r-- 303 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
"""ACME utilities."""
from typing import Any
from typing import Callable
from typing import Dict
from typing import Mapping


def map_keys(dikt: Mapping[Any, Any], func: Callable[[Any], Any]) -> Dict[Any, Any]:
    """Map dictionary keys."""
    return {func(key): value for key, value in dikt.items()}