MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / is_version_in_range

Function is_version_in_range

core/developer_notifications.py:135–153  ·  view source on GitHub ↗

Check if current version is within the specified range.

(
    current_version: str,
    min_version: str | None,
    max_version: str | None
)

Source from the content-addressed store, hash-verified

133
134
135def is_version_in_range(
136 current_version: str,
137 min_version: str | None,
138 max_version: str | None
139) -> bool:
140 """Check if current version is within the specified range."""
141 current = parse_version(current_version)
142 if not current:
143 return True # If we can't parse version, show notification
144
145 min_ver = parse_version(min_version)
146 max_ver = parse_version(max_version)
147
148 if min_ver and current < min_ver:
149 return False
150 if max_ver and current > max_ver:
151 return False
152
153 return True
154
155
156# ─────────────────────────────

Callers 2

should_show_notificationFunction · 0.85

Calls 1

parse_versionFunction · 0.85

Tested by

no test coverage detected