How to use the sdv.utils.remove_version_prefix function in sdv

To help you get started, we’ve selected a few sdv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github STIXProject / stix-validator / sdv / validators / stix / best_practice.py View on Github external
def can_run(stix_version, rule_min, rule_max):
            if not rule_min:
                return True

            doc_ver = StrictVersion(remove_version_prefix(stix_version))
            min_ver = StrictVersion(remove_version_prefix(rule_min))

            if rule_max:
                max_ver = StrictVersion(remove_version_prefix(rule_max))
                return (min_ver <= doc_ver <= max_ver)

            return min_ver <= doc_ver
github STIXProject / stix-validator / sdv / validators / stix / best_practice.py View on Github external
def can_run(stix_version, rule_min, rule_max):
            if not rule_min:
                return True

            doc_ver = StrictVersion(remove_version_prefix(stix_version))
            min_ver = StrictVersion(remove_version_prefix(rule_min))

            if rule_max:
                max_ver = StrictVersion(remove_version_prefix(rule_max))
                return (min_ver <= doc_ver <= max_ver)

            return min_ver <= doc_ver
github STIXProject / stix-validator / sdv / validators / stix / best_practice.py View on Github external
def can_run(stix_version, rule_min, rule_max):
            if not rule_min:
                return True

            doc_ver = StrictVersion(remove_version_prefix(stix_version))
            min_ver = StrictVersion(remove_version_prefix(rule_min))

            if rule_max:
                max_ver = StrictVersion(remove_version_prefix(rule_max))
                return (min_ver <= doc_ver <= max_ver)

            return min_ver <= doc_ver