From d502512e8d5eba6a07d5adf55a49a48ea90081c1 Mon Sep 17 00:00:00 2001 From: Sushant Mimani Date: Thu, 11 Nov 2021 11:53:52 -0800 Subject: [PATCH] Update test --- CHANGELOG.md | 3 ++- tartufo/util.py | 10 ---------- tests/test_base_scanner.py | 4 +--- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab089aec..f1662b9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,8 +23,9 @@ Features: Misc: -* [#255](https://github.com/godaddy/tartufo/issues/255) -- Removed deprecated flags +* [#255](https://github.com/godaddy/tartufo/issues/255) - Removed deprecated flags --include-paths and --exclude-paths +* [#282](https://github.com/godaddy/tartufo/pull/282) - Remove old style config for `exclude-entropy-patterns` v2.10.0 - 3 November 2021 ------------ diff --git a/tartufo/util.py b/tartufo/util.py index 670030f7..9ce6fa64 100644 --- a/tartufo/util.py +++ b/tartufo/util.py @@ -18,7 +18,6 @@ Optional, Tuple, TYPE_CHECKING, - Pattern, ) import click @@ -26,12 +25,10 @@ import pygit2 from tartufo import types -from tartufo.types import Rule if TYPE_CHECKING: from tartufo.scanner import Issue # pylint: disable=cyclic-import from tartufo.scanner import ScannerBase # pylint: disable=cyclic-import - from tartufo.config import OptionTypes # pylint: disable=cyclic-import DATETIME_FORMAT: str = "%Y-%m-%d %H:%M:%S" @@ -50,13 +47,6 @@ def del_rw(_func: Callable, name: str, _exc: Exception) -> None: os.remove(name) -def convert_regexes_to_rules(regexes: Dict[str, Pattern]) -> Dict[str, Rule]: - return { - name: Rule(name=name, pattern=pattern, path_pattern=None, re_match_type="match") - for name, pattern in regexes.items() - } - - def echo_result( options: "types.GlobalOptions", scanner: "ScannerBase", diff --git a/tests/test_base_scanner.py b/tests/test_base_scanner.py index fa29ae0d..2b576dd9 100644 --- a/tests/test_base_scanner.py +++ b/tests/test_base_scanner.py @@ -396,12 +396,10 @@ def test_entropy_string_is_excluded(self): { "path-pattern": r"docs/.*\.md", "pattern": "f.*", - "match-type": "search", - "scope": "line", } ] excluded = self.scanner.entropy_string_is_excluded( - "bar", "foo", "docs/README.md" + "foo", "barfoo", "docs/README.md" ) self.assertEqual(True, excluded)