okta-expression-parser 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/PKG-INFO +1 -1
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/expression_classes/string.py +9 -3
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/pyproject.toml +1 -1
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/README.md +0 -0
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/__init__.py +0 -0
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/expression_classes/__init__.py +0 -0
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/expression_classes/arrays.py +0 -0
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/expression_classes/convert.py +0 -0
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/expression_classes/groups.py +0 -0
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/expression_classes/iso3166convert.py +0 -0
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/lexer.py +0 -0
- {okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/parser.py +0 -0
|
@@ -87,12 +87,18 @@ class String:
|
|
|
87
87
|
return default
|
|
88
88
|
|
|
89
89
|
@classmethod
|
|
90
|
-
def substring(val: str, start: int, end: int):
|
|
90
|
+
def substring(self, val: str, start: int, end: int):
|
|
91
91
|
"""Return a substring of val starting at index start"""
|
|
92
|
+
if not isinstance(val, str):
|
|
93
|
+
return ""
|
|
94
|
+
|
|
95
|
+
if end > len(val):
|
|
96
|
+
end = -1
|
|
97
|
+
|
|
92
98
|
return val[int(start) : int(end)]
|
|
93
99
|
|
|
94
100
|
@classmethod
|
|
95
|
-
def substringAfter(val: str, search: str):
|
|
101
|
+
def substringAfter(self, val: str, search: str):
|
|
96
102
|
try:
|
|
97
103
|
start = str(val).index(str(search))
|
|
98
104
|
except ValueError:
|
|
@@ -101,7 +107,7 @@ class String:
|
|
|
101
107
|
return val[start:]
|
|
102
108
|
|
|
103
109
|
@classmethod
|
|
104
|
-
def substringBefore(val: str, search: str):
|
|
110
|
+
def substringBefore(self, val: str, search: str):
|
|
105
111
|
"""Return substring of val starting after the index of search string"""
|
|
106
112
|
try:
|
|
107
113
|
end = str(val).index(str(search))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "okta-expression-parser"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "Returns a boolean by passing Okta profile data to an Okta Expression using Okta Expression Language"
|
|
5
5
|
authors = ["Mathew Moon <me@mathewmoon.net>"]
|
|
6
6
|
readme = "README.md"
|
|
File without changes
|
{okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/lexer.py
RENAMED
|
File without changes
|
{okta_expression_parser-0.2.0 → okta_expression_parser-0.2.1}/okta_expression_parser/parser.py
RENAMED
|
File without changes
|