Skip to content

Commit ead8517

Browse files
committed
Linting fixes
1 parent c1d53e2 commit ead8517

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

filter_sarif.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import json
1010
import logging
1111
import re
12-
from typing import Any, Dict, Iterable, List, NoReturn, Optional, Tuple
12+
from typing import Any, Dict, Iterable, List, NoReturn, Optional, Tuple, Sequence, Mapping
1313
from string import Formatter
1414

1515
from globber import match
@@ -101,7 +101,7 @@ class SafeFormatter(Formatter):
101101
"""Prevent arbitrary field names - just allow numeric names, for positional arguments, with no formatting instructions."""
102102
valid_field_name_re = re.compile(r'^[0-9]{1,2}$')
103103

104-
def get_field(self, field_name: str, args: List[str], kwargs: Dict[str, str]) -> Any:
104+
def get_field(self, field_name: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any:
105105
if not SafeFormatter.valid_field_name_re.match(field_name):
106106
raise ValueError('Invalid format string.')
107107
return super().get_field(field_name, args, kwargs)

0 commit comments

Comments
 (0)