How to use the proximity.record_change_to function in proximity

To help you get started, we’ve selected a few proximity 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 adamtornhill / maat-scripts / miner / git_proximity_analysis.py View on Github external
def parse_changes_per_file_in(git_diff):
	files_with_changes = {}
	file_name = None

	for line in git_diff.split("\n"):
		# read ahead until we note the diff for a file:
		new_file = maybe_new_module(line)
		if new_file:
			file_name=new_file
		# one we have the diff of a file, accumulate the changes:
		if file_name:
			change = changed_line(line)
			proximity.record_change_to(file_name, change,files_with_changes)
	return files_with_changes

proximity

Mesh proximity queries based on libspatialindex and rtree, extracted from Trimesh

MIT
Latest version published 2 years ago

Package Health Score

39 / 100
Full package analysis