Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def increment_version(context):
import ai2thor._version
major, minor, subv = ai2thor._version.__version__.split(".")
subv = int(subv) + 1
with open("ai2thor/_version.py", "w") as fi:
fi.write("# Copyright Allen Institute for Artificial Intelligence 2017\n")
fi.write("# GENERATED FILE - DO NOT EDIT\n")
fi.write("__version__ = '%s.%s.%s'\n" % (major, minor, subv))