浏览代码

fix mypy error

Thomas Waldmann 1 年之前
父节点
当前提交
d7e2e2cea9
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/borg/helpers/__init__.py

+ 2 - 1
src/borg/helpers/__init__.py

@@ -6,6 +6,7 @@ Code used to be in borg/helpers.py but was split into the modules in this
 package, which are imported into here for compatibility.
 package, which are imported into here for compatibility.
 """
 """
 import os
 import os
+from typing import List
 from collections import namedtuple
 from collections import namedtuple
 
 
 from ..constants import *  # NOQA
 from ..constants import *  # NOQA
@@ -65,7 +66,7 @@ warning_info = namedtuple("warning_info", "wc,msg,args,wt")
 """
 """
 The global warnings_list variable is used to collect warning_info elements while borg is running.
 The global warnings_list variable is used to collect warning_info elements while borg is running.
 """
 """
-_warnings_list = []
+_warnings_list: List[warning_info] = []
 
 
 
 
 def add_warning(msg, *args, **kwargs):
 def add_warning(msg, *args, **kwargs):