def __init__(self, hard):
		if format.is_interactive_format():
			print("")

		self.hard = hard
		self.changes = changes.get(hard)
		get(self.hard, self.changes)
		Outputable.__init__(self)
Example #2
0
    def __init__(self, hard):
        if format.is_interactive_format():
            print("")

        self.hard = hard
        self.changes = changes.get(hard)
        get(self.hard, self.changes)
        Outputable.__init__(self)
Example #3
0
    def __init__(self, changes, hard, useweeks):
        if format.is_interactive_format():
            print("")

        self.changes = changes
        self.hard = hard
        self.useweeks = useweeks
        get(self.hard, self.useweeks, self.changes)
        Outputable.__init__(self)
Example #4
0
	def __init__(self, changes, hard, useweeks):
		if format.is_interactive_format():
			print("")

		self.changes = changes
		self.hard = hard
		self.useweeks = useweeks
		get(self.hard, self.useweeks, self.changes)
		Outputable.__init__(self)
	def output_text(self):
		if sys.stdout.isatty() and format.is_interactive_format():
			terminal.clear_row()

		print(textwrap.fill(_(BLAME_INFO_TEXT) + ":", width=terminal.get_size()[0]) + "\n")
		terminal.printb(_("Author").ljust(21) + _("Rows").rjust(10) + _("% in comments").rjust(20))

		for i in sorted(__blame__.get_summed_blames().items()):
			print(i[0].ljust(20)[0:20], end=" ")
			print(str(i[1].rows).rjust(10), end=" ")
			print("{0:.2f}".format(100.0 * i[1].comments / i[1].rows).rjust(19))
Example #6
0
	def output_text(self):
		if sys.stdout.isatty() and format.is_interactive_format():
			terminal.clear_row()

		print(textwrap.fill(_(BLAME_INFO_TEXT) + ":", width=terminal.get_size()[0]) + "\n")
		terminal.printb(terminal.ljust(_("Author"), 21) + terminal.rjust(_("Rows"), 10) + terminal.rjust(_("Stability"), 15) +
		                terminal.rjust(_("Age"), 13) + terminal.rjust(_("% in comments"), 20))

		for i in sorted(__blame__.get_summed_blames().items()):
			print(terminal.ljust(i[0], 20)[0:20 - terminal.get_excess_column_count(i[0])], end=" ")
			print(str(i[1].rows).rjust(10), end=" ")
			print("{0:.1f}".format(Blame.get_stability(i[0], i[1].rows, self.changes)).rjust(14), end=" ")
			print("{0:.1f}".format(float(i[1].skew) / i[1].rows).rjust(12), end=" ")
			print("{0:.2f}".format(100.0 * i[1].comments / i[1].rows).rjust(19))
Example #7
0
	def output_text(self):
		if sys.stdout.isatty() and format.is_interactive_format():
			terminal.clear_row()

		print(textwrap.fill(_(BLAME_INFO_TEXT) + ":", width=terminal.get_size()[0]) + "\n")
		terminal.printb(terminal.ljust(_("Author"), 21) + terminal.rjust(_("Rows"), 10) + terminal.rjust(_("Stability"), 15) +
		                terminal.rjust(_("Age"), 13) + terminal.rjust(_("% in comments"), 20))

		for i in sorted(__blame__.get_summed_blames().items()):
			print(terminal.ljust(i[0], 20)[0:20 - terminal.get_excess_column_count(i[0])], end=" ")
			print(str(i[1].rows).rjust(10), end=" ")
			print("{0:.1f}".format(Blame.get_stability(i[0], i[1].rows, self.changes)).rjust(14), end=" ")
			print("{0:.1f}".format(float(i[1].skew) / i[1].rows).rjust(12), end=" ")
			print("{0:.2f}".format(100.0 * i[1].comments / i[1].rows).rjust(19))
Example #8
0
    def output_text(self):
        if sys.stdout.isatty() and format.is_interactive_format():
            terminal.clear_row()

        print(
            textwrap.fill(_(BLAME_INFO_TEXT) + ":",
                          width=terminal.get_size()[0]) + "\n")
        terminal.printb(
            _("Author").ljust(21) + _("Rows").rjust(10) +
            _("% in comments").rjust(20))

        for i in sorted(__blame__.get_summed_blames().items()):
            print(i[0].ljust(20)[0:20], end=" ")
            print(str(i[1].rows).rjust(10), end=" ")
            print("{0:.2f}".format(100.0 * i[1].comments /
                                   i[1].rows).rjust(19))
Example #9
0
	def output_progress(pos, length):
		if sys.stdout.isatty() and format.is_interactive_format():
			terminal.clear_row()
			print("\b" + _(PROGRESS_TEXT).format(100 * pos / length), end="")
			sys.stdout.flush()
Example #10
0
 def output_progress(pos, length):
     if sys.stdout.isatty() and format.is_interactive_format():
         terminal.clear_row()
         print(_(PROGRESS_TEXT).format(100 * pos / length), end="")
         sys.stdout.flush()
Example #11
0
	def output_progress(pos, length):
		if sys.stdout.isatty() and format.is_interactive_format():
			terminal.clear_row()
			print("\bChecking how many rows belong to each author (Progress): {0:.0f}%".format(100 * pos / length), end="")
			sys.stdout.flush()