INNER CODE UNIT · Python

parse_version

mongodb/mongo-cxx-driver · etc/calc_release_version.py:80

def parse_version(ver):
    return Version(ver)


parser = optparse.OptionParser(description=__doc__)
parser.add_option('--debug', '-d', action='store_true', help='Enable debug output')
parser.add_option('--next-minor', action='store_true', help='Calculate the next minor version instead of the current')
args, pos = parser.parse_args()
assert not pos, 'No positional arguments are expected'


_DEBUG = args.debug  # type: bool


def debug(msg):  # type: (str) -> None
    if _DEBUG:
        sys.stderr.write(msg)
        sys.stderr.write('\n')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…