Uploaded Test files

This commit is contained in:
Batuhan Berk Başoğlu 2020-11-12 11:05:57 -05:00
parent f584ad9d97
commit 2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions

View file

@ -0,0 +1,35 @@
# encoding: utf-8
"""
Utilities for version comparison
It is a bit ridiculous that we need these.
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from distutils.version import LooseVersion
def check_version(v, min_v, max_v=None):
"""check version string v >= min_v and v < max_v
Parameters
----------
v : str
version of the package
min_v : str
minimal version supported
max_v : str
earliest version not supported
Note: If dev/prerelease tags result in TypeError for string-number
comparison, it is assumed that the check passes and the version dependency
is satisfied. Users on dev branches are responsible for keeping their own
packages up to date.
"""
try:
below_max = LooseVersion(v) < LooseVersion(max_v) if max_v is not None else True
return LooseVersion(v) >= LooseVersion(min_v) and below_max
except TypeError:
return True