@@ -171,6 +171,12 @@ def get_compatibility_info(self) -> dict[str, str]:
171171 def is_compatible_with_bcasl (self , bcasl_version : str ) -> bool :
172172 """Check if plugin is compatible with given BCASL version.
173173
174+ Supports version formats:
175+ - "1.0.0" -> (1, 0, 0)
176+ - "1.0.0+" -> (1, 0, 0) [+ means "or higher"]
177+ - "1.0.0-beta" -> (1, 0, 0)
178+ - "1.0.0+build123" -> (1, 0, 0)
179+
174180 Args:
175181 bcasl_version: BCASL version string to check against
176182
@@ -179,7 +185,11 @@ def is_compatible_with_bcasl(self, bcasl_version: str) -> bool:
179185 """
180186 def parse_version (v : str ) -> tuple :
181187 try :
182- parts = v .strip ().split ("+" )[0 ].split ("-" )[0 ].split ("." )
188+ s = v .strip ()
189+ if s .endswith ("+" ):
190+ s = s [:- 1 ].strip ()
191+ s = s .split ("+" )[0 ].split ("-" )[0 ]
192+ parts = s .split ("." )
183193 major = int (parts [0 ]) if len (parts ) > 0 else 0
184194 minor = int (parts [1 ]) if len (parts ) > 1 else 0
185195 patch = int (parts [2 ]) if len (parts ) > 2 else 0
@@ -194,6 +204,12 @@ def parse_version(v: str) -> tuple:
194204 def is_compatible_with_core (self , core_version : str ) -> bool :
195205 """Check if plugin is compatible with given Core version.
196206
207+ Supports version formats:
208+ - "1.0.0" -> (1, 0, 0)
209+ - "1.0.0+" -> (1, 0, 0) [+ means "or higher"]
210+ - "1.0.0-beta" -> (1, 0, 0)
211+ - "1.0.0+build123" -> (1, 0, 0)
212+
197213 Args:
198214 core_version: Core version string to check against
199215
@@ -202,7 +218,11 @@ def is_compatible_with_core(self, core_version: str) -> bool:
202218 """
203219 def parse_version (v : str ) -> tuple :
204220 try :
205- parts = v .strip ().split ("+" )[0 ].split ("-" )[0 ].split ("." )
221+ s = v .strip ()
222+ if s .endswith ("+" ):
223+ s = s [:- 1 ].strip ()
224+ s = s .split ("+" )[0 ].split ("-" )[0 ]
225+ parts = s .split ("." )
206226 major = int (parts [0 ]) if len (parts ) > 0 else 0
207227 minor = int (parts [1 ]) if len (parts ) > 1 else 0
208228 patch = int (parts [2 ]) if len (parts ) > 2 else 0
@@ -217,6 +237,12 @@ def parse_version(v: str) -> tuple:
217237 def is_compatible_with_plugins_sdk (self , sdk_version : str ) -> bool :
218238 """Check if plugin is compatible with given Plugins SDK version.
219239
240+ Supports version formats:
241+ - "1.0.0" -> (1, 0, 0)
242+ - "1.0.0+" -> (1, 0, 0) [+ means "or higher"]
243+ - "1.0.0-beta" -> (1, 0, 0)
244+ - "1.0.0+build123" -> (1, 0, 0)
245+
220246 Args:
221247 sdk_version: Plugins SDK version string to check against
222248
@@ -225,7 +251,11 @@ def is_compatible_with_plugins_sdk(self, sdk_version: str) -> bool:
225251 """
226252 def parse_version (v : str ) -> tuple :
227253 try :
228- parts = v .strip ().split ("+" )[0 ].split ("-" )[0 ].split ("." )
254+ s = v .strip ()
255+ if s .endswith ("+" ):
256+ s = s [:- 1 ].strip ()
257+ s = s .split ("+" )[0 ].split ("-" )[0 ]
258+ parts = s .split ("." )
229259 major = int (parts [0 ]) if len (parts ) > 0 else 0
230260 minor = int (parts [1 ]) if len (parts ) > 1 else 0
231261 patch = int (parts [2 ]) if len (parts ) > 2 else 0
@@ -240,6 +270,12 @@ def parse_version(v: str) -> tuple:
240270 def is_compatible_with_bc_plugin_context (self , context_version : str ) -> bool :
241271 """Check if plugin is compatible with given BcPluginContext version.
242272
273+ Supports version formats:
274+ - "1.0.0" -> (1, 0, 0)
275+ - "1.0.0+" -> (1, 0, 0) [+ means "or higher"]
276+ - "1.0.0-beta" -> (1, 0, 0)
277+ - "1.0.0+build123" -> (1, 0, 0)
278+
243279 Args:
244280 context_version: BcPluginContext version string to check against
245281
@@ -248,7 +284,11 @@ def is_compatible_with_bc_plugin_context(self, context_version: str) -> bool:
248284 """
249285 def parse_version (v : str ) -> tuple :
250286 try :
251- parts = v .strip ().split ("+" )[0 ].split ("-" )[0 ].split ("." )
287+ s = v .strip ()
288+ if s .endswith ("+" ):
289+ s = s [:- 1 ].strip ()
290+ s = s .split ("+" )[0 ].split ("-" )[0 ]
291+ parts = s .split ("." )
252292 major = int (parts [0 ]) if len (parts ) > 0 else 0
253293 minor = int (parts [1 ]) if len (parts ) > 1 else 0
254294 patch = int (parts [2 ]) if len (parts ) > 2 else 0
@@ -263,6 +303,12 @@ def parse_version(v: str) -> tuple:
263303 def is_compatible_with_general_context (self , context_version : str ) -> bool :
264304 """Check if plugin is compatible with given GeneralContext version.
265305
306+ Supports version formats:
307+ - "1.0.0" -> (1, 0, 0)
308+ - "1.0.0+" -> (1, 0, 0) [+ means "or higher"]
309+ - "1.0.0-beta" -> (1, 0, 0)
310+ - "1.0.0+build123" -> (1, 0, 0)
311+
266312 Args:
267313 context_version: GeneralContext version string to check against
268314
@@ -271,7 +317,11 @@ def is_compatible_with_general_context(self, context_version: str) -> bool:
271317 """
272318 def parse_version (v : str ) -> tuple :
273319 try :
274- parts = v .strip ().split ("+" )[0 ].split ("-" )[0 ].split ("." )
320+ s = v .strip ()
321+ if s .endswith ("+" ):
322+ s = s [:- 1 ].strip ()
323+ s = s .split ("+" )[0 ].split ("-" )[0 ]
324+ parts = s .split ("." )
275325 major = int (parts [0 ]) if len (parts ) > 0 else 0
276326 minor = int (parts [1 ]) if len (parts ) > 1 else 0
277327 patch = int (parts [2 ]) if len (parts ) > 2 else 0
0 commit comments