# This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
import os from difflib import unified_diff from pathlib import Path from subprocess import PIPE, Popen
def calculate_diff_size(diff):
additions, removals = 0, 0 # ignore first 2 item in the sequence # which are +++ and --- for line in diff[2:]: if line.startswith("+"):
additions += 1 elif line.startswith("-"):
removals += 1 return max((additions, removals))
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.