Rename simple_acl -> acl
authorScott Gasch <[email protected]>
Fri, 9 Jul 2021 03:08:22 +0000 (20:08 -0700)
committerScott Gasch <[email protected]>
Fri, 9 Jul 2021 03:08:22 +0000 (20:08 -0700)
acl.py [moved from simple_acl.py with 100% similarity]
dateparse/dateparse_utils.py
tests/acl_test.py [moved from tests/simple_acl_test.py with 98% similarity]

similarity index 100%
rename from simple_acl.py
rename to acl.py
index fc5408fb8cd9a252a2f21165aea960d0c3fe0a3e..00e7b9dbb393c4c40be60e0079e0b8377e071ea2 100755 (executable)
@@ -13,13 +13,13 @@ import dateutil.easter
 import dateutil.tz
 import pytz
 
+import acl
 import bootstrap
 import datetime_utils
 import decorator_utils
 from dateparse.dateparse_utilsLexer import dateparse_utilsLexer  # type: ignore
 from dateparse.dateparse_utilsListener import dateparse_utilsListener  # type: ignore
 from dateparse.dateparse_utilsParser import dateparse_utilsParser  # type: ignore
-import simple_acl as acl
 
 
 logger = logging.getLogger(__name__)
@@ -78,16 +78,18 @@ class RaisingErrorListener(antlr4.DiagnosticErrorListener):
         pass
 
 
-@decorator_utils.decorate_matching_methods_with(debug_parse,
-                                                acl=acl.StringWildcardBasedACL(
-                                                    allowed_patterns=[
-                                                        'enter*',
-                                                        'exit*',
-                                                    ],
-                                                    denied_patterns=None,
-                                                    order_to_check_allow_deny=acl.ACL_ORDER_DENY_ALLOW,
-                                                    default_answer=False
-                                                ))
+@decorator_utils.decorate_matching_methods_with(
+    debug_parse,
+    acl=acl.StringWildcardBasedACL(
+        allowed_patterns=[
+            'enter*',
+            'exit*',
+        ],
+        denied_patterns=None,
+        order_to_check_allow_deny=acl.ACL_ORDER_DENY_ALLOW,
+        default_answer=False
+    )
+)
 class DateParser(dateparse_utilsListener):
     PARSE_TYPE_SINGLE_DATE_EXPR = 1
     PARSE_TYPE_BASE_AND_OFFSET_EXPR = 2
similarity index 98%
rename from tests/simple_acl_test.py
rename to tests/acl_test.py
index 6c9b24c930a94b08494a02b3da29f7347975280b..810aedf48bd7bd925132a1c5b940cf62c09f1462 100755 (executable)
@@ -3,8 +3,8 @@
 import re
 import unittest
 
+import acl
 import bootstrap
-import simple_acl as acl
 
 
 class TestSimpleACL(unittest.TestCase):