Skip to content

Commit 706588a

Browse files
committed
review comments
1 parent f429fc5 commit 706588a

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

featuremanagement/_defaultfilters.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ def evaluate(self, context: Mapping[Any, Any], **kwargs: Any) -> bool:
8484
start_time: Optional[datetime] = parsedate_to_datetime(start) if start else None
8585
end_time: Optional[datetime] = parsedate_to_datetime(end) if end else None
8686

87-
if not start and not end:
88-
logging.warning("%s: At least one of Start or End is required.", TimeWindowFilter.__name__)
89-
return False
90-
9187
if (start_time is None or start_time <= current_time) and (end_time is None or current_time < end_time):
9288
return True
9389

featuremanagement/_time_window_filter/_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __init__(self, range_data: Dict[str, Any]):
109109
except TypeError as e:
110110
# Python 3.9 and earlier throw TypeError if the string is not in RFC 2822 format.
111111
raise ValueError(f"Invalid value for EndDate: {end_date_str}") from e
112-
self.num_of_occurrences = range_data.get("NumberOfOccurrences", math.pow(2, 63) - 1)
112+
self.num_of_occurrences = range_data.get("NumberOfOccurrences", 2 ** 63 - 1)
113113
if self.num_of_occurrences <= 0:
114114
raise ValueError("The number of occurrences must be greater than 0.")
115115

0 commit comments

Comments
 (0)