Skip to content

Commit 1c37fbf

Browse files
author
uzair-folio3
committed
invalid test case for semver and comment fixed
1 parent cfb12df commit 1c37fbf

File tree

2 files changed

+64
-52
lines changed

2 files changed

+64
-52
lines changed

optimizely/helpers/condition.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ def is_pre_release(self, target):
105105
"""
106106
return SemverType.IS_PRE_RELEASE in target
107107

108-
def is_patch_pre_release(self, idx, idx_value):
109-
return idx == SemverType.PATCH_INDEX and idx_value in SemverType.IS_PATCH_PRE_RELEASE
110-
111108
def is_build(self, target):
112109
""" Method to check if the given version contains "+"
113110
@@ -499,14 +496,14 @@ def split_semantic_version(self, target):
499496
target_suffix = ""
500497
target_parts = []
501498

502-
""" remove spaces from target version string """
499+
# remove spaces from target version string
503500

504501
if self.has_white_space(target):
505502
self.logger.warning(Errors.INVALID_ATTRIBUTE_FORMAT)
506503
return None
507504

508505
# check for pre release e.g. 1.0.0-alpha where 'alpha' is a pre release
509-
# otherwise check for build e.g. 1.0.0+001 where 001 is a build metadata"""
506+
# otherwise check for build e.g. 1.0.0+001 where 001 is a build metadata
510507

511508
if self.is_pre_release(target):
512509
target_parts = target.split(SemverType.IS_PRE_RELEASE)

0 commit comments

Comments
 (0)