id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
0
core_test.py
git-cola_git-cola/test/core_test.py
"""Tests the cola.core module's unicode handling""" from cola import core from . import helper def test_core_decode(): """Test the core.decode function""" filename = helper.fixture('unicode.txt') expect = core.decode(core.encode('unicøde')) actual = core.read(filename).strip() assert expect == a...
1,528
Python
.py
42
31.714286
53
0.689891
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
1
startup_test.py
git-cola_git-cola/test/startup_test.py
"""Test Startup Dialog (git cola --prompt) Context Menu and related classes""" from cola.widgets import startup from .helper import app_context # Prevent unused imports lint errors. assert app_context is not None def test_get_with_default_repo(app_context): """Test BuildItem::get for default repo""" path = ...
2,555
Python
.py
67
33.343284
78
0.703163
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
2
spellcheck_test.py
git-cola_git-cola/test/spellcheck_test.py
from cola import compat from cola import spellcheck from . import helper def test_spellcheck_generator(): check = spellcheck.NorvigSpellCheck() assert_spellcheck(check) def test_spellcheck_unicode(): path = helper.fixture('unicode.txt') check = spellcheck.NorvigSpellCheck(words=path) assert_spe...
474
Python
.py
14
29.5
51
0.752759
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
3
compat_test.py
git-cola_git-cola/test/compat_test.py
"""Tests the compat module""" import os from cola import compat def test_setenv(): """Test the core.decode function""" key = 'COLA_UNICODE_TEST' value = '字龍' compat.setenv(key, value) assert key in os.environ assert os.getenv(key) compat.unsetenv(key) assert key not in os.environ ...
351
Python
.py
13
22.615385
39
0.690909
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
4
gitcfg_test.py
git-cola_git-cola/test/gitcfg_test.py
"""Test the cola.gitcfg module.""" import pathlib from . import helper from .helper import app_context # Prevent unused imports lint errors. assert app_context is not None def assert_color(context, expect, git_value, key='test', default=None): """Helper function for testing color values""" helper.run_git('...
4,587
Python
.py
103
40.126214
80
0.680189
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
5
main_model_test.py
git-cola_git-cola/test/main_model_test.py
import os import pytest from cola import core from cola import git from cola.models import main from cola.models.main import FETCH, FETCH_HEAD, PULL, PUSH from . import helper from .helper import app_context from .helper import Mock # prevent unused imports lint errors. assert app_context is not None REMOTE = 'se...
7,183
Python
.py
222
26.689189
82
0.655522
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
6
app_test.py
git-cola_git-cola/test/app_test.py
import argparse from cola import app def test_setup_environment(): # If the function doesn't throw an exception we are happy. assert hasattr(app, 'setup_environment') app.setup_environment() def test_add_common_arguments(): # If the function doesn't throw an exception we are happy. parser = arg...
428
Python
.py
11
34.909091
62
0.75
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
7
cmds_test.py
git-cola_git-cola/test/cmds_test.py
"""Test the cmds module""" from cola import cmds from cola.compat import uchr from .helper import Mock, patch def test_Commit_strip_comments(): """Ensure that commit messages are stripped of comments""" msg = 'subject\n\n#comment\nbody' expect = 'subject\n\nbody\n' actual = cmds.Commit.strip_comment...
7,046
Python
.py
170
36.582353
78
0.692105
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
8
display_test.py
git-cola_git-cola/test/display_test.py
from cola import display def test_shorten_paths(): paths = ( '/usr/src/git-cola/src', '/usr/src/example/src', '/usr/src/super/lib/src', '/usr/src/super/tools/src', '/usr/src/super/example/src', '/lib/src', ) actual = display.shorten_paths(paths) assert a...
744
Python
.py
22
28.090909
50
0.615599
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
9
gitcmds_test.py
git-cola_git-cola/test/gitcmds_test.py
"""Test the cola.gitcmds module""" import os from cola import core from cola import gitcmds from cola.widgets.remote import get_default_remote from . import helper from .helper import app_context # Prevent unused imports lint errors. assert app_context is not None def test_currentbranch(app_context): """Test ...
7,264
Python
.py
171
37.391813
88
0.66856
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
10
gitops_test.py
git-cola_git-cola/test/gitops_test.py
"""Tests basic git operations: commit, log, config""" from . import helper from .helper import app_context # Prevent unused imports lint errors. assert app_context is not None def test_git_commit(app_context): """Test running 'git commit' via cola.git""" helper.write_file('A', 'A') helper.write_file('B'...
816
Python
.py
21
34.809524
84
0.664549
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
11
branch_test.py
git-cola_git-cola/test/branch_test.py
"""Tests related to the branches widget""" from cola.widgets import branch from .helper import Mock def test_create_tree_entries(): names = [ 'abc', 'cat/abc', 'cat/def', 'xyz/xyz', ] root = branch.create_tree_entries(names) expect = 3 actual = len(root.children) ...
6,703
Python
.py
213
24.107981
84
0.569921
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
12
resources_test.py
git-cola_git-cola/test/resources_test.py
from cola import resources from . import helper from .helper import patch @patch('cola.resources.compat') @patch('cola.resources.get_prefix') def test_command_unix(mock_prefix, mock_compat): """Test the behavior of resources.command() on unix platforms""" mock_compat.WIN32 = False mock_prefix.return_valu...
1,146
Python
.py
28
36.892857
68
0.713255
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
13
icons_test.py
git-cola_git-cola/test/icons_test.py
from cola import compat from cola import core from cola import icons def test_from_filename_unicode(): filename = compat.uchr(0x400) + '.py' expect = 'file-code.svg' actual = icons.basename_from_filename(filename) assert expect == actual actual = icons.basename_from_filename(core.encode(filename)...
350
Python
.py
10
31.3
64
0.738872
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
14
gravatar_test.py
git-cola_git-cola/test/gravatar_test.py
from cola import gravatar from cola.compat import ustr def test_url_for_email_(): email = 'email@example.com' expect = ( 'https://gravatar.com/avatar/5658ffccee7f0ebfda2b226238b1eb6e?s=64' + r'&d=https%3A%2F%2Fgit-cola.github.io%2Fimages%2Fgit-64x64.jpg' ) actual = gravatar.Gravatar.ur...
407
Python
.py
11
32.181818
75
0.71066
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
15
git_test.py
git-cola_git-cola/test/git_test.py
"""Test the cola.git module""" import os import pathlib from cola import git from cola.git import STDOUT from .helper import patch # 16k+1 bytes to exhaust any output buffers. BUFFER_SIZE = (16 * 1024) + 1 @patch('cola.git.is_git_dir') def test_find_git_dir_None(is_git_dir): paths = git.find_git_directory(Non...
12,019
Python
.py
318
32.283019
84
0.640024
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
16
settings_test.py
git-cola_git-cola/test/settings_test.py
"""Test the cola.settings module""" import os import pytest from cola.settings import Settings from . import helper @pytest.fixture(autouse=True) def settings_fixture(): """Provide Settings that save into a temporary location to all tests""" filename = helper.tmp_path('settings') Settings.config_path =...
2,527
Python
.py
65
34.061538
75
0.691961
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
17
utils_test.py
git-cola_git-cola/test/utils_test.py
"""Tests the cola.utils module.""" import os from cola import core from cola import utils def test_basename(): """Test the utils.basename function.""" assert utils.basename('bar') == 'bar' assert utils.basename('/bar') == 'bar' assert utils.basename('/bar ') == 'bar ' assert utils.basename('foo/b...
3,010
Python
.py
85
30.023529
67
0.630345
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
18
browse_model_test.py
git-cola_git-cola/test/browse_model_test.py
"""Test interfaces used by the browser (git cola browse)""" from cola import core from cola import gitcmds from . import helper from .helper import app_context # Prevent unused imports lint errors. assert app_context is not None def test_stage_paths_untracked(app_context): """Test stage_paths() with an untrack...
1,709
Python
.py
45
33.577778
59
0.697632
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
19
dag_test.py
git-cola_git-cola/test/dag_test.py
"""Tests DAG functionality""" import pytest from cola.models import dag from .helper import app_context from .helper import patch # Prevent unused imports lint errors. assert app_context is not None LOG_TEXT = """ 23e7eab4ba2c94e3155f5d261c693ccac1342eb9^Af4fb8fd5baaa55d9b41faca79be289bb4407281e^A^ADavid Aguilar^...
3,882
Python
.py
75
46.88
184
0.759778
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
20
switcher_test.py
git-cola_git-cola/test/switcher_test.py
"""Test Quick Switcher""" from cola import icons from cola.widgets import switcher def test_switcher_item_with_only_key(): """item text would be key by building item without name""" key = 'item-key' actual = switcher.switcher_item(key) assert actual.key == key assert actual.text() == key def te...
615
Python
.py
17
31.941176
68
0.688663
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
21
helper.py
git-cola_git-cola/test/helper.py
import os import shutil import stat import tempfile from unittest.mock import Mock, patch import pytest from cola import core from cola import git from cola import gitcfg from cola import gitcmds from cola.models import main # prevent unused imports lint errors. assert patch is not None def tmp_path(*paths): ...
2,850
Python
.py
76
33.236842
88
0.691551
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
22
i18n_test.py
git-cola_git-cola/test/i18n_test.py
"""Tests for the i18n translation module""" import os import pytest from cola import i18n from cola.i18n import N_ from cola.compat import uchr @pytest.fixture(autouse=True) def i18n_context(): """Perform cleanup/teardown of the i18n module""" yield i18n.uninstall() def test_translates_noun(): """...
1,985
Python
.py
57
30.508772
70
0.678553
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
23
stash_model_test.py
git-cola_git-cola/test/stash_model_test.py
from cola.models.stash import StashModel from . import helper from .helper import app_context # Prevent unused imports lint errors. assert app_context is not None def test_stash_info_for_message_without_slash(app_context): helper.commit_files() helper.write_file('A', 'change') helper.run_git('stash', '...
1,525
Python
.py
39
33.974359
75
0.667346
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
24
models_selection_test.py
git-cola_git-cola/test/models_selection_test.py
from cola.models import selection from .helper import Mock def test_union(): t = Mock() t.staged = ['a'] t.unmerged = ['a', 'b'] t.modified = ['b', 'a', 'c'] t.untracked = ['d'] expect = ['a', 'b', 'c', 'd'] actual = selection.union(t) assert expect == actual
296
Python
.py
11
22.636364
33
0.558719
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
25
diffparse_test.py
git-cola_git-cola/test/diffparse_test.py
"""Tests for the diffparse module""" import pytest from cola import core from cola import diffparse from . import helper class DiffLinesTestData: """Test data used by DiffLines tests""" def __init__(self): self.parser = diffparse.DiffLines() fixture_path = helper.fixture('diff.txt') ...
10,053
Python
.py
297
28.592593
88
0.598367
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
26
textwrap_test.py
git-cola_git-cola/test/textwrap_test.py
"""Test the textwrap module""" import pytest from cola import textwrap class WordWrapDefaults: def __init__(self): self.tabwidth = 8 self.limit = None def wrap(self, text, break_on_hyphens=True): return textwrap.word_wrap( text, self.tabwidth, self.limit, break_on_hyphens...
4,877
Python
.py
158
26.772152
78
0.669455
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
27
_activate_cola.py
git-cola_git-cola/bin/_activate_cola.py
# Developer wrapper script helper functions import configparser import datetime import os import sys def activate(): """Activate the cola development environment""" initialize_python() initialize_version() def get_prefix(): """Return the path to the source tree""" realpath = os.path.abspath(os.p...
3,910
Python
.py
104
31.288462
85
0.651772
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
28
sphinxtogithub.py
git-cola_git-cola/extras/sphinxtogithub/sphinxtogithub.py
#! /usr/bin/env python from optparse import OptionParser import os import sys import shutil import codecs def stdout(msg): sys.stdout.write(msg + '\n') class DirHelper: def __init__(self, is_dir, list_dir, walk, rmtree): self.is_dir = is_dir self.list_dir = list_dir self.walk = wa...
10,273
Python
.py
286
26.307692
87
0.588824
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
29
__init__.py
git-cola_git-cola/extras/sphinxtogithub/__init__.py
"""Script for preparing the html output of the Sphinx documentation system for github pages. """ VERSION = (1, 1, 0, 'dev') __version__ = '.'.join(map(str, VERSION[:-1])) __release__ = '.'.join(map(str, VERSION)) __author__ = 'Michael Jones' __contact__ = 'http://github.com/michaeljones' __homepage__ = 'http://github...
670
Python
.py
25
23.44
78
0.691589
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
30
conf.py
git-cola_git-cola/docs/conf.py
import os import sys try: import furo except ImportError: furo = None try: import sphinx_rtd_theme except ImportError: sphinx_rtd_theme = None try: import rst.linker as rst_linker except ImportError: rst_linker = None # Add the source tree and extras/ to sys.path. srcdir = os.path.dirname(os.p...
3,186
Python
.py
93
29.451613
87
0.658862
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
31
pynsist-preamble.py
git-cola_git-cola/contrib/win32/pynsist-preamble.py
import os pythondir = os.path.join(installdir, 'Python') # noqa path = os.environ.get('PATH', '') os.environ['PATH'] = os.pathsep.join([pythondir, pkgdir, path]) # noqa
172
Python
.py
4
41.75
71
0.694611
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
32
run-pynsist.sh
git-cola_git-cola/contrib/win32/run-pynsist.sh
#!/bin/sh rm -rf build/nsis && make all && make doc && make htmldir="$PWD/share/doc/git-cola/html" install-doc && pynsist pynsist.cfg && rm -r share/doc/git-cola/html
167
Python
.py
7
22.857143
58
0.7125
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
33
difftool.py
git-cola_git-cola/cola/difftool.py
import os from qtpy import QtWidgets from qtpy.QtCore import Qt from . import cmds from . import core from . import gitcmds from . import hotkeys from . import icons from . import qtutils from . import utils from .git import EMPTY_TREE_OID from .i18n import N_ from .interaction import Interaction from .widgets import...
9,801
Python
.py
265
28.120755
86
0.612073
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
34
resources.py
git-cola_git-cola/cola/resources.py
"""Functions for finding cola resources""" import os import sys import webbrowser from . import core from . import compat # Default git-cola icon theme _default_icon_theme = 'light' _resources = core.abspath(core.realpath(__file__)) _package = os.path.dirname(_resources) if _package.endswith(os.path.join('site-pac...
6,746
Python
.py
166
34.692771
91
0.657786
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
35
sequenceeditor.py
git-cola_git-cola/cola/sequenceeditor.py
import sys import re from argparse import ArgumentParser from functools import partial from cola import app # prints a message if Qt cannot be found from qtpy import QtGui from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from cola import core from cola import difftool from cola im...
30,613
Python
.py
828
27.822464
88
0.592962
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
36
__main__.py
git-cola_git-cola/cola/__main__.py
"""Run cola as a Python module. Usage: python -m cola """ from cola import main def run(): """Start the command-line interface.""" main.main() if __name__ == '__main__': run()
194
Python
.py
9
18.555556
43
0.620112
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
37
interaction.py
git-cola_git-cola/cola/interaction.py
import os import sys from . import core from .i18n import N_ class Interaction: """Prompts the user and answers questions""" VERBOSE = bool(os.getenv('GIT_COLA_VERBOSE')) @classmethod def command(cls, title, cmd, status, out, err): """Log a command and display error messages on failure""" ...
4,367
Python
.py
129
25.503876
87
0.572783
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
38
settings.py
git-cola_git-cola/cola/settings.py
"""Save settings, bookmarks, etc.""" import json import os import sys from . import core from . import display from . import git from . import resources def mkdict(obj): """Transform None and non-dicts into dicts""" if isinstance(obj, dict): value = obj else: value = {} return value ...
13,449
Python
.py
338
30.488166
89
0.602361
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
39
cmds.py
git-cola_git-cola/cola/cmds.py
"""Editor commands""" import os import re import sys from fnmatch import fnmatch from io import StringIO try: from send2trash import send2trash except ImportError: send2trash = None from . import compat from . import core from . import gitcmds from . import icons from . import resources from . import textwrap...
94,958
Python
.py
2,476
29.057754
87
0.585685
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
40
spellcheck.py
git-cola_git-cola/cola/spellcheck.py
import codecs import collections import os from . import resources __copyright__ = """ 2012 Peter Norvig (http://norvig.com/spell-correct.html) 2013-2018 David Aguilar <davvid@gmail.com> """ ALPHABET = 'abcdefghijklmnopqrstuvwxyz' def train(features, model): for f in features: model[f] += 1 return ...
3,130
Python
.py
88
27.159091
75
0.596549
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
41
qtutils.py
git-cola_git-cola/cola/qtutils.py
"""Miscellaneous Qt utility functions.""" import os from qtpy import compat from qtpy import QtGui from qtpy import QtCore from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from . import core from . import hotkeys from . import icons from . import utils from .i18n import N_ from .co...
39,535
Python
.py
1,012
32.623518
118
0.67718
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
42
polib.py
git-cola_git-cola/cola/polib.py
# # License: MIT (see extras/polib/LICENSE file provided) # vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: """ **polib** allows you to manipulate, create, modify gettext files (pot, po and mo files). You can load existing files, iterate through it's entries, add, modify entries, comments or metadata, etc. o...
60,104
Python
.py
1,589
27.178099
87
0.542504
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
43
guicmds.py
git-cola_git-cola/cola/guicmds.py
import os from qtpy import QtGui from . import cmds from . import core from . import difftool from . import display from . import gitcmds from . import icons from . import qtutils from .i18n import N_ from .interaction import Interaction from .widgets import completion from .widgets import editremotes from .widgets i...
13,106
Python
.py
330
33.418182
87
0.663043
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
44
dag.py
git-cola_git-cola/cola/dag.py
import argparse import sys from cola import app from cola.widgets.dag import git_dag def main(argv=None): """Run git-dag""" app.initialize() args = parse_args(argv=argv) return args.func(args) def shortcut_launch(): """Run git-dag from a Windows shortcut""" return main(argv=['--prompt']) ...
1,312
Python
.py
42
25.619048
84
0.644444
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
45
git.py
git-cola_git-cola/cola/git.py
from functools import partial import errno import os from os.path import join import subprocess import threading import time from . import core from .compat import int_types from .compat import ustr from .compat import WIN32 from .decorators import memoize from .interaction import Interaction GIT_COLA_TRACE = core.g...
14,698
Python
.py
383
28.284595
87
0.56887
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
46
display.py
git-cola_git-cola/cola/display.py
"""Display models and utility functions""" import collections try: import notify2 except ImportError: notify2 = None try: import notifypy except ImportError: notifypy = None from . import interaction def shorten_paths(source_paths): """Shorten a sequence of paths into unique strings for display"...
2,585
Python
.py
68
30.294118
78
0.64377
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
47
app.py
git-cola_git-cola/cola/app.py
"""Provides the main() routine and ColaApplication""" from functools import partial import argparse import os import random import signal import sys import time try: from qtpy import QtCore except ImportError as error: sys.stderr.write( """ Your Python environment does not have qtpy and PyQt (or PySide...
20,714
Python
.py
541
31.484288
86
0.648103
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
48
i18n.py
git-cola_git-cola/cola/i18n.py
"""i18n and l10n support for git-cola""" import locale import os try: import polib except ImportError: from . import polib import sys from . import core from . import resources class NullTranslation: """This is a pass-through object that does nothing""" def gettext(self, value): return valu...
3,742
Python
.py
112
27.464286
75
0.647942
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
49
hotkeys.py
git-cola_git-cola/cola/hotkeys.py
import sys from qtpy.QtGui import QKeySequence from qtpy.QtCore import Qt def hotkey(*seq): return QKeySequence(*seq) # A-G STAGE_MODIFIED = hotkey(Qt.ALT | Qt.Key_A) WORD_LEFT = hotkey(Qt.Key_B) BLAME = hotkey(Qt.CTRL | Qt.SHIFT | Qt.Key_B) BRANCH = hotkey(Qt.CTRL | Qt.Key_B) CHECKOUT = hotkey(Qt.ALT | Qt.Key...
5,027
Python
.py
133
36.609023
67
0.714403
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
50
utils.py
git-cola_git-cola/cola/utils.py
"""Miscellaneous utility functions""" import copy import os import re import shlex import sys import tempfile import time import traceback from . import core from . import compat def asint(obj, default=0): """Make any value into an int, even if the cast fails""" try: value = int(obj) except (Type...
10,897
Python
.py
327
27.033639
84
0.619166
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
51
core.py
git-cola_git-cola/cola/core.py
"""This module provides core functions for handling Unicode and Unix quirks The @interruptable functions retry when system calls are interrupted, e.g. when python raises an IOError or OSError with errno == EINTR. """ import ctypes import functools import itertools import mimetypes import os import platform import subp...
16,154
Python
.py
431
31.672854
88
0.677287
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
52
gitcfg.py
git-cola_git-cola/cola/gitcfg.py
from binascii import unhexlify import collections import copy import fnmatch import os import struct try: import pwd _use_pwd = True except ImportError: _use_pwd = False from qtpy import QtCore from qtpy.QtCore import Signal from . import core from . import utils from . import version from . import res...
22,649
Python
.py
560
31.119643
87
0.595915
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
53
themes.py
git-cola_git-cola/cola/themes.py
"""Themes generators""" import os try: import AppKit except ImportError: AppKit = None from qtpy import QtGui from .i18n import N_ from .widgets import defs from . import core from . import icons from . import qtutils from . import resources from . import utils class EStylesheet: DEFAULT = 1 FLAT =...
25,581
Python
.py
733
22.566166
130
0.510572
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
54
diffparse.py
git-cola_git-cola/cola/diffparse.py
import math import re from collections import Counter from itertools import groupby from . import compat DIFF_CONTEXT = ' ' DIFF_ADDITION = '+' DIFF_DELETION = '-' DIFF_NO_NEWLINE = '\\' def parse_range_str(range_str): if ',' in range_str: begin, end = range_str.split(',', 1) return int(begin),...
15,170
Python
.py
368
28.733696
88
0.532917
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
55
compat.py
git-cola_git-cola/cola/compat.py
import os import sys try: import urllib2 as parse # noqa except ImportError: # Python 3 from urllib import parse # noqa PY_VERSION = sys.version_info[:2] # (2, 7) PY_VERSION_MAJOR = PY_VERSION[0] PY2 = PY_VERSION_MAJOR == 2 PY3 = PY_VERSION_MAJOR >= 3 PY26_PLUS = PY2 and sys.version_info[1] >= 6 WIN32...
1,879
Python
.py
64
25.015625
75
0.666481
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
56
inotify.py
git-cola_git-cola/cola/inotify.py
import ctypes import ctypes.util import errno import os # constant from Linux include/uapi/linux/limits.h NAME_MAX = 255 # constants from Linux include/uapi/linux/inotify.h IN_MODIFY = 0x00000002 IN_ATTRIB = 0x00000004 IN_CLOSE_WRITE = 0x00000008 IN_MOVED_FROM = 0x00000040 IN_MOVED_TO = 0x00000080 IN_CREATE = 0x00000...
2,195
Python
.py
66
28.5
70
0.683736
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
57
editpatch.py
git-cola_git-cola/cola/editpatch.py
import textwrap from . import core from . import diffparse from . import utils from .i18n import N_ from .interaction import Interaction from .models import prefs def wrap_comment(context, text): indent = prefs.comment_char(context) + ' ' return ( textwrap.fill( text, width=80...
2,926
Python
.py
82
26.646341
88
0.581363
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
58
textwrap.py
git-cola_git-cola/cola/textwrap.py
"""Text wrapping and filling""" import re from .compat import ustr # Copyright (C) 1999-2001 Gregory P. Ward. # Copyright (C) 2002, 2003 Python Software Foundation. # Copyright (C) 2013-2024 David Aguilar # Written by Greg Ward <gward@python.net> # Simplified for git-cola by David Aguilar <davvid@gmail.com> class T...
9,212
Python
.py
227
31.07489
85
0.572451
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
59
gravatar.py
git-cola_git-cola/cola/gravatar.py
import time import hashlib from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from qtpy import QtNetwork from . import core from . import icons from . import qtutils from .compat import parse from .models import prefs from .widgets import defs class Gravatar: @staticmethod def url_for...
5,301
Python
.py
127
33.062992
83
0.639379
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
60
hidpi.py
git-cola_git-cola/cola/hidpi.py
"""Provides High DPI support by wrapping Qt options""" from qtpy import QtCore from .i18n import N_ from . import core from . import compat from . import version class Option: AUTO = '0' DISABLE = 'disable' TIMES_1 = '1' TIMES_1_25 = '1.25' TIMES_1_5 = '1.5' TIMES_2 = '2' def is_supported(...
1,233
Python
.py
37
27.189189
78
0.610455
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
61
version.py
git-cola_git-cola/cola/version.py
"""Provide git-cola's version number""" import sys try: if sys.version_info < (3, 8): import importlib_metadata as metadata else: from importlib import metadata except (ImportError, OSError): metadata = None from .git import STDOUT from .decorators import memoize from ._version import VERS...
4,357
Python
.py
127
29.228346
75
0.66119
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
62
main.py
git-cola_git-cola/cola/main.py
"""Launcher and command line interface to git-cola""" import argparse import sys from . import app from . import cmds from . import compat from . import core from . import version def main(argv=None): app.initialize() if argv is None: argv = sys.argv[1:] # we're using argparse with subparsers, bu...
22,506
Python
.py
626
29.619808
88
0.654264
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
63
qtcompat.py
git-cola_git-cola/cola/qtcompat.py
from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from qtpy.QtCore import Qt try: from qtpy import PYQT4 except ImportError: PYQT4 = False from . import hotkeys def patch(obj, attr, value): if not hasattr(obj, attr): setattr(obj, attr, value) def install(): patch(Qt...
1,659
Python
.py
53
25.471698
72
0.658491
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
64
decorators.py
git-cola_git-cola/cola/decorators.py
import errno import functools __all__ = ('decorator', 'memoize', 'interruptable') def decorator(caller, func=None): """ Create a new decorator decorator(caller) converts a caller function into a decorator; decorator(caller, func) decorates a function using a caller. """ if func is None: ...
1,991
Python
.py
61
25.639344
68
0.633648
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
65
cmd.py
git-cola_git-cola/cola/cmd.py
"""Base Command class""" class Command: """Mixin interface for commands""" UNDOABLE = False @staticmethod def name(): """Return the command's name""" return '(undefined)' @classmethod def is_undoable(cls): """Can this be undone?""" return cls.UNDOABLE de...
789
Python
.py
27
22.222222
59
0.610372
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
66
actions.py
git-cola_git-cola/cola/actions.py
"""QAction creator functions""" from . import cmds from . import difftool from . import hotkeys from . import icons from . import qtutils from .i18n import N_ def cmd_action(widget, cmd, context, icon, *shortcuts): """Wrap a generic ContextCommand in a QAction""" action = qtutils.add_action(widget, cmd.name(...
1,920
Python
.py
53
31.54717
87
0.696544
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
67
fsmonitor.py
git-cola_git-cola/cola/fsmonitor.py
# Copyright (C) 2008-2024 David Aguilar # Copyright (C) 2015 Daniel Harding """Filesystem monitor for Linux and Windows Linux monitoring uses using inotify. Windows monitoring uses pywin32 and the ReadDirectoryChanges function. """ import errno import os import os.path import select from threading import Lock from q...
19,921
Python
.py
487
26.431211
88
0.507382
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
68
icons.py
git-cola_git-cola/cola/icons.py
"""The only file where icon filenames are mentioned""" import os from qtpy import QtGui from qtpy import QtWidgets from . import core from . import decorators from . import qtcompat from . import resources from .compat import ustr from .i18n import N_ KNOWN_FILE_MIME_TYPES = [ ('text', 'file-code.svg'), ('i...
9,943
Python
.py
316
26.810127
79
0.650804
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
69
gitcmds.py
git-cola_git-cola/cola/gitcmds.py
"""Git commands and queries for Git""" import json import os import re from io import StringIO from . import core from . import utils from . import version from .git import STDOUT from .git import EMPTY_TREE_OID from .git import OID_LENGTH from .i18n import N_ from .interaction import Interaction from .models import p...
31,804
Python
.py
862
30.219258
88
0.624947
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
70
edit-copy.svg
git-cola_git-cola/cola/icons/edit-copy.svg
<svg width="22" height="22" version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"><path d="m14.682 2h-9.8182c-.9 0-1.6364.73636-1.6364 1.6364v11.455h1.6364v-11.455h9.8182zm2.4545 3.2727h-9c-.9 0-1.6364.73636-1.6364 1.6364v11.455c0 .9.73636 1.6364 1.6364 1.6364h9c.9 0 1.6364-.73636 1.6364-1.6364v-11.455c0...
413
Python
.py
1
412
412
0.708738
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
71
edit-copy.svg
git-cola_git-cola/cola/icons/dark/edit-copy.svg
<svg width="22" height="22" version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"><path d="m14.682 2h-9.8182c-.9 0-1.6364.73636-1.6364 1.6364v11.455h1.6364v-11.455h9.8182zm2.4545 3.2727h-9c-.9 0-1.6364.73636-1.6364 1.6364v11.455c0 .9.73636 1.6364 1.6364 1.6364h9c.9 0 1.6364-.73636 1.6364-1.6364v-11.455c0...
426
Python
.py
1
425
425
0.710588
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
72
about.py
git-cola_git-cola/cola/widgets/about.py
import platform import webbrowser import os import sys import qtpy from qtpy import QtCore from qtpy.QtCore import Qt from qtpy import QtGui from qtpy import QtWidgets from ..i18n import N_ from .. import resources from .. import hotkeys from .. import icons from .. import qtutils from .. import utils from .. import ...
20,603
Python
.py
466
36.038627
82
0.61787
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
73
bookmarks.py
git-cola_git-cola/cola/widgets/bookmarks.py
"""Provides widgets related to bookmarks""" import os from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from .. import cmds from .. import core from .. import git from .. import hotkeys from .. import icons from .. import qtutils from ....
18,050
Python
.py
436
32.215596
88
0.638518
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
74
browse.py
git-cola_git-cola/cola/widgets/browse.py
import shlex from qtpy.QtCore import Qt from qtpy.QtCore import Signal from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from ..models.browse import GitRepoModel from ..models.browse import GitRepoNameItem from ..models.selection import State from ..i18n import N_ from ..interaction import Int...
27,762
Python
.py
691
30.82055
86
0.620613
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
75
recent.py
git-cola_git-cola/cola/widgets/recent.py
from qtpy import QtCore from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from ..i18n import N_ from ..qtutils import get from .. import cmds from .. import gitcmds from .. import hotkeys from .. import icons from .. import qtutils from .browse import GitTreeWidget from .browse impor...
4,782
Python
.py
121
31.272727
85
0.660112
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
76
stash.py
git-cola_git-cola/cola/widgets/stash.py
"""Widgets for manipulating git stashes""" from qtpy.QtCore import Qt from ..i18n import N_ from ..interaction import Interaction from ..models import stash from ..qtutils import get from .. import cmds from .. import hotkeys from .. import icons from .. import qtutils from . import defs from . import diff from . impo...
10,311
Python
.py
258
30.585271
88
0.613725
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
77
finder.py
git-cola_git-cola/cola/widgets/finder.py
"""File finder widgets""" import os from functools import partial from qtpy import QtCore from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from ..i18n import N_ from ..qtutils import get from ..utils import Group from .. import cmds from .. import core from .. import gitcmds from ....
6,865
Python
.py
183
30.26776
88
0.647023
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
78
switcher.py
git-cola_git-cola/cola/widgets/switcher.py
"""Provides quick switcher""" import re from qtpy import QtCore from qtpy import QtGui from qtpy.QtCore import Qt from qtpy.QtCore import Signal from .. import qtutils from ..widgets import defs from ..widgets import standard from ..widgets import text def switcher_inner_view( context, entries, title=None, plac...
8,555
Python
.py
212
32.358491
88
0.665258
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
79
createtag.py
git-cola_git-cola/cola/widgets/createtag.py
from qtpy import QtWidgets from qtpy.QtCore import Qt from .. import cmds from .. import icons from .. import qtutils from ..i18n import N_ from ..qtutils import get from . import defs from . import completion from . import standard from . import text def new_create_tag(context, name='', ref='', sign=False, parent=N...
4,105
Python
.py
107
30.149533
84
0.621914
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
80
spellcheck.py
git-cola_git-cola/cola/widgets/spellcheck.py
import re from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from qtpy.QtCore import Qt from .. import qtutils from .. import spellcheck from ..i18n import N_ from .text import HintedTextEdit class SpellCheckTextEdit(HintedTextEdit): def __init__(self, context, hint, check=None, parent=No...
8,143
Python
.py
188
32.648936
95
0.621051
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
81
highlighter.py
git-cola_git-cola/cola/widgets/highlighter.py
from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets have_pygments = True try: from pygments.styles import get_style_by_name from pygments import lex from pygments.util import ClassNotFound from pygments.lexers import get_lexer_for_filename except ImportError: have_pygments = F...
3,268
Python
.py
90
27.2
72
0.606646
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
82
submodules.py
git-cola_git-cola/cola/widgets/submodules.py
"""Provides widgets related to submodules""" from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from .. import cmds from .. import compat from .. import core from .. import qtutils from .. import icons from ..i18n import N_ from ..widgets import defs from ..widgets import standard fr...
7,291
Python
.py
182
31.120879
87
0.622807
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
83
merge.py
git-cola_git-cola/cola/widgets/merge.py
from qtpy import QtWidgets from qtpy.QtCore import Qt from ..i18n import N_ from ..interaction import Interaction from ..qtutils import get from .. import cmds from .. import icons from .. import qtutils from . import completion from . import standard from . import defs def local_merge(context): """Provides a di...
8,704
Python
.py
215
30.8
88
0.621718
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
84
archive.py
git-cola_git-cola/cola/widgets/archive.py
"""Git Archive dialog""" import os from qtpy import QtCore from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from ..git import STDOUT from ..i18n import N_ from ..interaction import Interaction from .. import cmds from .. import core from .. import icons from .. import qtutils from ...
8,366
Python
.py
211
30.582938
87
0.626649
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
85
startup.py
git-cola_git-cola/cola/widgets/startup.py
"""The startup dialog is presented when no repositories can be found at startup""" from qtpy.QtCore import Qt from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from ..i18n import N_ from ..models import prefs from .. import cmds from .. import core from .. import display from .. import guicmds...
19,701
Python
.py
483
31.15528
88
0.61906
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
86
dag.py
git-cola_git-cola/cola/widgets/dag.py
import collections import itertools import math from functools import partial from qtpy.QtCore import Qt from qtpy.QtCore import Signal from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from ..compat import maxsize from ..i18n import N_ from ..models import dag from ..models import main from ....
84,912
Python
.py
2,047
31.401075
88
0.605781
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
87
search.py
git-cola_git-cola/cola/widgets/search.py
"""A widget for searching git commits""" import time from qtpy import QtCore from qtpy import QtWidgets from qtpy.QtCore import Qt from ..i18n import N_ from ..interaction import Interaction from ..git import STDOUT from ..qtutils import connect_button from ..qtutils import create_toolbutton from ..qtutils import get...
11,202
Python
.py
299
28.77592
88
0.625
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
88
editremotes.py
git-cola_git-cola/cola/widgets/editremotes.py
import operator from qtpy import QtCore from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from ..git import STDOUT from ..i18n import N_ from ..qtutils import get from .. import cmds from .. import core from .. import gitcmds from .. import icons from .. import qtutils from .. impor...
15,263
Python
.py
385
30.361039
87
0.617454
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
89
branch.py
git-cola_git-cola/cola/widgets/branch.py
"""Provides widgets related to branches""" from functools import partial from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from ..compat import uchr from ..git import STDOUT from ..i18n import N_ from ..interaction import Interaction from ..models import main as main_mod from ..widg...
29,798
Python
.py
713
31.086957
88
0.594952
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
90
clone.py
git-cola_git-cola/cola/widgets/clone.py
import os from functools import partial from qtpy import QtCore from qtpy import QtWidgets from qtpy.QtCore import Qt from .. import cmds from .. import core from .. import icons from .. import utils from .. import qtutils from ..i18n import N_ from ..interaction import Interaction from ..qtutils import get from . im...
6,816
Python
.py
177
30.231638
87
0.622293
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
91
prefs.py
git-cola_git-cola/cola/widgets/prefs.py
from qtpy import QtCore from qtpy import QtWidgets from . import defs from . import standard from .. import cmds from .. import hidpi from .. import icons from .. import qtutils from .. import themes from ..compat import ustr from ..i18n import N_ from ..models import prefs from ..models.prefs import Defaults from ..m...
21,345
Python
.py
436
39.091743
88
0.642617
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
92
toolbar.py
git-cola_git-cola/cola/widgets/toolbar.py
from functools import partial from qtpy import QtGui from qtpy.QtCore import Qt from qtpy import QtWidgets from ..i18n import N_ from .. import icons from .. import qtutils from . import defs from . import standard from .toolbarcmds import COMMANDS TREE_LAYOUT = { 'Others': ['Others::LaunchEditor', 'Others::Rev...
18,550
Python
.py
469
30.17484
87
0.617964
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
93
status.py
git-cola_git-cola/cola/widgets/status.py
import itertools import os from functools import partial from qtpy.QtCore import Qt from qtpy import QtCore from qtpy import QtWidgets from ..i18n import N_ from ..models import prefs from ..models import selection from ..widgets import gitignore from ..widgets import standard from ..qtutils import get from ..setting...
61,277
Python
.py
1,448
31.953729
88
0.609709
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
94
text.py
git-cola_git-cola/cola/widgets/text.py
"""Text widgets""" from functools import partial import math from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from ..models import prefs from ..qtutils import get from .. import hotkeys from .. import icons from .. import qtutils from ...
41,580
Python
.py
1,019
31.602552
88
0.625933
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
95
defs.py
git-cola_git-cola/cola/widgets/defs.py
import os import math try: scale_factor = float(os.getenv('GIT_COLA_SCALE', '1')) except ValueError: scale_factor = 1.0 def scale(value, factor=scale_factor): return int(value * factor) no_margin = 0 small_margin = scale(2) margin = scale(4) large_margin = scale(12) no_spacing = 0 spacing = scale(4) ...
825
Python
.py
34
22.441176
58
0.71871
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
96
log.py
git-cola_git-cola/cola/widgets/log.py
import time from qtpy import QtGui from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from .. import core from .. import qtutils from ..i18n import N_ from . import defs from . import text from . import standard class LogWidget(QtWidgets.QFrame): """A simple dialog to display c...
5,084
Python
.py
119
34.428571
87
0.6418
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
97
cfgactions.py
git-cola_git-cola/cola/widgets/cfgactions.py
import os from qtpy import QtCore from qtpy import QtWidgets from qtpy.QtCore import Qt from .. import core from .. import gitcmds from .. import icons from .. import qtutils from ..i18n import N_ from ..interaction import Interaction from . import defs from . import completion from . import standard from .text impor...
10,670
Python
.py
273
29.930403
82
0.622689
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
98
standard.py
git-cola_git-cola/cola/widgets/standard.py
from functools import partial import os import time from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from qtpy.QtWidgets import QDockWidget from ..i18n import N_ from ..interaction import Interaction from ..settings import Settings, mk...
37,781
Python
.py
984
29.448171
87
0.617627
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)
99
imageview.py
git-cola_git-cola/cola/widgets/imageview.py
# Copyright (c) 2018-2024 David Aguilar <davvid@gmail.com> # # Git Cola is GPL licensed, but this file has a more permissive license. # This file is dual-licensed Git Cola GPL + pyqimageview MIT. # imageview.py was originally based on the pyqimageview: # https://github.com/nevion/pyqimageview/ # # The MIT License (MIT)...
16,155
Python
.py
399
31.025063
88
0.611554
git-cola/git-cola
2,239
455
69
GPL-2.0
9/5/2024, 5:06:50 PM (Europe/Amsterdam)