Skip to content

Commit

Permalink
python: datamodel: types: pylint error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alesmrazek committed Oct 8, 2024
1 parent 7430a6c commit d540691
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/knot_resolver/datamodel/types/base_types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from typing import Any, Dict, Pattern, Type
from typing import Any, Dict, Type

from knot_resolver.utils.modeling import BaseValueType

Expand Down Expand Up @@ -154,10 +154,10 @@ class PatternBase(StrBase):
Just inherit the class and set regex pattern for '_re'.
class ABPattern(PatternBase):
_re: Pattern[str] = re.compile(r"ab*")
_re: re.Pattern[str] = re.compile(r"ab*")
"""

_re: Pattern[str]
_re: re.Pattern[str]

def __init__(self, source_value: Any, object_path: str = "/") -> None:
super().__init__(source_value, object_path)
Expand All @@ -178,7 +178,7 @@ class CustomUnit(PatternBase):
_units = {"b": 1, "kb": 1000}
"""

_re: Pattern[str]
_re: re.Pattern[str]
_units: Dict[str, int]
_base_value: int

Expand Down

0 comments on commit d540691

Please sign in to comment.