def METHOD_NAME(skip_failing: bool = False, patch_type: PatchType | None = None) -> None:
	"""run all pending patches"""
	executed = set(frappe.get_all("Patch Log", filters={"skipped": 0}, fields="patch", pluck="patch"))
	frappe.flags.final_patches = []
	def run_patch(patch):
		try:
			if not run_single(patchmodule=patch):
				print(patch + ": failed: STOPPED")
				raise PatchError(patch)
		except Exception:
			if not skip_failing:
				raise
			print("Failed to execute patch")
			update_patch_log(patch, skipped=True)
	patches = get_all_patches(patch_type=patch_type)
	for patch in patches:
		if patch and (patch not in executed):
			run_patch(patch)
	# patches to be run in the end
	for patch in frappe.flags.final_patches:
		patch = patch.replace("finally:", "")
		run_patch(patch)