コード例 #1
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))
コード例 #2
0
	def output_text(self):
		print("")
		get(self.hard)

		if self.hard and sys.stdout.isatty():
			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(16))
		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(15))
コード例 #3
0
ファイル: blame.py プロジェクト: marham/gitinspector
	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))
コード例 #4
0
ファイル: blame.py プロジェクト: Spencerx/git-inspector
	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))
コード例 #5
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))
コード例 #6
0
ファイル: blame.py プロジェクト: Eric--/cowry
	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()
コード例 #7
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()
コード例 #8
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()