c10177e717a57c5db8b0e8ab7efa07051e77c4be,setup.py,,get_version,#,30

Before Change



	// Try to use git first.
	try:
		version_git = subprocess.check_output(
			["git", "describe", "--abbrev=0"]
		).decode("utf-8").rstrip()
	except (FileNotFoundError, subprocess.CalledProcessError):
		// Oops. Just get it from ther version file.
		version_git = None

After Change


		for line in fh:
			if line.startswith("__version__"):
				return line.split("=")[-1].strip().replace(""", "")
	raise ValueError("Failed to parse version from: {}".format(version_py))

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
setup(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: deepgram/kur
Commit Name: c10177e717a57c5db8b0e8ab7efa07051e77c4be
Time: 2016-12-05
Author: ajsyp@syptech.net
File Name: setup.py
Class Name:
Method Name: get_version


Project Name: mozilla/mozregression
Commit Name: c10b618fd4044e79be9e127fd8b8be27edf3e7ed
Time: 2020-03-15
Author: wlachance@mozilla.com
File Name: gui/mozregui/report.py
Class Name: BuildInfoTextBrowser
Method Name: update_content


Project Name: bjherger/ResumeParser
Commit Name: e08fcab00157590859a9a19bd483825e9ba75c18
Time: 2019-03-29
Author: 13herger@gmail.com
File Name: bin/lib.py
Class Name:
Method Name: convert_pdf


Project Name: rlworkgroup/garage
Commit Name: afbeee84a6b1f06e32f804c58958d70fd557983a
Time: 2019-01-15
Author: gautams3@users.noreply.github.com
File Name: garage/envs/mujoco/randomization/variation.py
Class Name: Variations
Method Name: get_randomized_xml_model