mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-26 04:40:20 +00:00
ci/lint-commit-msg: move away from things deprecated in Python 3.9
As normal types started being supported better for type hinting, their alternatives in the typing module would be deprecated.
This commit is contained in:
@@ -4,7 +4,8 @@ import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import Callable, Dict, Optional, Tuple
|
||||
from collections.abc import Callable
|
||||
from typing import Optional
|
||||
|
||||
|
||||
def call(cmd) -> str:
|
||||
@@ -12,7 +13,7 @@ def call(cmd) -> str:
|
||||
ret = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, text=True)
|
||||
return ret.stdout
|
||||
|
||||
lint_rules: Dict[str, Tuple[Callable, str]] = {}
|
||||
lint_rules: dict[str, tuple[Callable, str]] = {}
|
||||
|
||||
# A lint rule should return True if everything is okay
|
||||
def lint_rule(description: str):
|
||||
|
||||
Reference in New Issue
Block a user