refinement

This commit is contained in:
Greg DiCristofaro 2020-07-17 11:03:32 -04:00
parent 526876a64f
commit e4c20b129b
3 changed files with 27 additions and 0 deletions

View File

@ -3,6 +3,12 @@ from propsutil import get_entry_dict
class ItemChange:
rel_path: str
key: str
prev_val: str
cur_val: str
type: str
def __init__(self, rel_path: str, key: str, prev_val: str, cur_val: str):
"""Describes the change that occurred for a particular key of a properties file.

View File

@ -1,4 +1,9 @@
class PropEntry:
rel_path: str
key: str
value: str
should_delete: str
def __init__(self, rel_path: str, key: str, value: str, should_delete: bool = False):
"""Defines a property file entry to be updated in a property file.

View File

@ -0,0 +1,16 @@
from typing import TypeVar, Callable, Tuple
def is_match(content: str, regex: str) -> bool:
pass
T = TypeVar('T')
def is_match_on_field(obj: T, prop_retriever: Callable[T, str]) -> bool:
pass
class SeparationResult:
def __init__(self, ):
def separate(obj: T, prop_retriever: Callable[T, str]) ->