def METHOD_NAME(app: str, patch_type: PatchType | None = None) -> list[str]:
	"""Get patches from an app's patches.txt
	patches.txt can be:
	        1. ini like file with section for different patch_type
	        2. plain text file with each line representing a patch.
	"""
	patches_file = frappe.get_app_path(app, "patches.txt")
	try:
		return parse_as_configfile(patches_file, patch_type)
	except configparser.MissingSectionHeaderError:
		# treat as old format with each line representing a single patch
		# backward compatbility with old patches.txt format
		if not patch_type or patch_type == PatchType.pre_model_sync:
			return frappe.get_file_items(patches_file)
	return []