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
37,000
TypeScript.py
coala_coala/coalib/bearlib/languages/definitions/TypeScript.py
from coalib.bearlib.languages.Language import Language @Language class TypeScript: aliases = 'ts', extensions = '.ts', '.tsx' comment_delimiters = '//', multiline_comment_delimiters = {'/*': '*/'} string_delimiters = {'"': '"', "'": "'"} multiline_string_delimiters = {'`': '`'} indent_type...
1,282
Python
.py
26
36.076923
74
0.446571
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,001
__init__.py
coala_coala/coalib/bearlib/languages/definitions/__init__.py
""" This directory holds language definitions. Language definitions hold expressions that help defining specific syntax elements for a programming language. Currently defined keys are: names extensions comment_delimiters multiline_comment_delimiters string_delimiters multiline_string_delimiters keyword...
1,229
Python
.py
30
39.1
72
0.812238
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,002
html.py
coala_coala/coalib/bearlib/languages/definitions/html.py
from coalib.bearlib.languages.Language import Language @Language class HTML: __qualname__ = 'Hypertext Markup Language' versions = 2.0, 3.2, 4.0, 4.01, 5, 5.1 extensions = '.html', '.htm' multiline_comment_delimiters = {'<!--': '-->'} string_delimiters = {'"': '"', "'": "'"} multiline_string_...
426
Python
.py
11
34.545455
54
0.640777
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,003
Text.py
coala_coala/coalib/bearlib/languages/definitions/Text.py
from coalib.bearlib.languages.Language import Language @Language class Text: extensions = '.txt', multiline_comment_delimiters = {} comment_delimiters = () string_delimiters = {} multiline_string_delimiters = {} indent_types = () encapsulators = {} string_delimiter_escape = {}
312
Python
.py
11
24.272727
54
0.692308
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,004
Golang.py
coala_coala/coalib/bearlib/languages/definitions/Golang.py
from coalib.bearlib.languages.Language import Language @Language class Golang: aliases = 'go', extensions = '.go', comment_delimiters = '//', multiline_comment_delimiters = {'/*': '*/'} string_delimiters = {'"': '"'} multiline_string_delimiters = {'`': '`'} indent_types = {'{': '}'} en...
398
Python
.py
12
29
54
0.565104
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,005
C.py
coala_coala/coalib/bearlib/languages/definitions/C.py
from coalib.bearlib.languages.Language import Language @Language class C: extensions = '.c', '.h' comment_delimiters = '//', multiline_comment_delimiters = {'/*': '*/'} string_delimiters = {'"': '"'} multiline_string_delimiters = {} indent_types = {'{': '}'} encapsulators = {'(': ')', '[':...
900
Python
.py
20
39.1
73
0.510251
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,006
PowerShell.py
coala_coala/coalib/bearlib/languages/definitions/PowerShell.py
from coalib.bearlib.languages.Language import Language @Language class PowerShell: extensions = '.ps1', comment_delimiters = '#', multiline_comment_delimiters = {'<#': '#>'} string_delimiters = {'"': '"', "'": "'"} multiline_string_delimiters = string_delimiters encapsulators = {'(': ')', '[':...
336
Python
.py
9
33.444444
54
0.606154
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,007
CSharp.py
coala_coala/coalib/bearlib/languages/definitions/CSharp.py
from coalib.bearlib.languages.Language import Language @Language class CSharp: __qualname__ = 'C#' aliases = 'CS', extensions = '.cs', comment_delimiters = '//', multiline_comment_delimiters = {'/*': '*/'} string_delimiters = {'"': '"'} string_delimiter_escape = {'"': '\\"'}
306
Python
.py
10
26.6
54
0.602041
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,008
JavaScript.py
coala_coala/coalib/bearlib/languages/definitions/JavaScript.py
from coalib.bearlib.languages.Language import Language @Language class JavaScript: aliases = 'js', 'ecmascript', 'node' extensions = '.js', comment_delimiters = '//', multiline_comment_delimiters = {'/*': '*/'} string_delimiters = {'"': '"', "'": "'"} multiline_string_delimiters = {} inden...
437
Python
.py
12
32.25
54
0.555556
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,009
Markdown.py
coala_coala/coalib/bearlib/languages/definitions/Markdown.py
from coalib.bearlib.languages.Language import Language @Language class Markdown: extensions = [ '.markdown', '.mdown', '.mkdn', '.md', '.mkd', '.mdwn', '.mdtxt', '.mdtext'] multiline_comment_delimiters = {'<!--': '-->'}
254
Python
.py
8
26.5
54
0.581967
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,010
KornShell.py
coala_coala/coalib/bearlib/languages/definitions/KornShell.py
from coalib.bearlib.languages.Language import Language @Language class KornShell: extensions = '.ksh', comment_delimiters = '#', multiline_comment_delimiters = {": '": "'"} string_delimiters = {'"': '"', "'": "'", '`': '`'} multiline_string_delimiters = string_delimiters encapsulators = {'[': ...
553
Python
.py
15
31.466667
62
0.527985
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,011
SASS.py
coala_coala/coalib/bearlib/languages/definitions/SASS.py
from coalib.bearlib.languages.Language import Language @Language class SASS: extensions = '.sass', comment_delimiters = '//', multiline_comment_delimiters = {'/*': '*/'} encapsulators = {'(': ')', '[': ']'} interpolation = {'{': '}'} keywords = [ 'include', 'not', 'to', 'through', 'if'...
477
Python
.py
13
31.538462
65
0.534632
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,012
XML.py
coala_coala/coalib/bearlib/languages/definitions/XML.py
from coalib.bearlib.languages.Language import Language @Language class XML: __qualname__ = 'Extensible Markup Language' aliases = 'xml', versions = 1.0, extensions = '.xml', multiline_comment_delimiters = {'<!--': '-->'} string_delimiters = {'"': '"', "'": "'", '<![CDATA[': ']]>'} multili...
392
Python
.py
11
31.454545
64
0.608466
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,013
Matlab.py
coala_coala/coalib/bearlib/languages/definitions/Matlab.py
from coalib.bearlib.languages.Language import Language @Language class Matlab: aliases = 'Octave', extensions = '.m' comment_delimiters = '%',
157
Python
.py
6
22.833333
54
0.724832
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,014
JSON.py
coala_coala/coalib/bearlib/languages/definitions/JSON.py
from coalib.bearlib.languages.Language import Language @Language class JSON: __qualname__ = 'JavaScript Object Notation' aliases = 'json', extensions = '.json', string_delimiters = {'"': '"'} encapsulators = {'[': ']', '{': '}'}
252
Python
.py
8
27.625
54
0.626556
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,015
ObjectiveC.py
coala_coala/coalib/bearlib/languages/definitions/ObjectiveC.py
from coalib.bearlib.languages.Language import Language @Language class ObjectiveC: aliases = 'objective-c',
114
Python
.py
4
26
54
0.814815
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,016
ZShell.py
coala_coala/coalib/bearlib/languages/definitions/ZShell.py
from coalib.bearlib.languages.Language import Language @Language class ZShell: extensions = '.zsh', comment_delimiters = '#', multiline_comment_delimiters = {": '": "'"} string_delimiters = {'"': '"', "'": "'", '`': '`'} multiline_string_delimiters = string_delimiters encapsulators = {'[': ']'...
692
Python
.py
18
32.444444
55
0.526786
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,017
Verilog.py
coala_coala/coalib/bearlib/languages/definitions/Verilog.py
from coalib.bearlib.languages.Language import Language @Language class Verilog: aliases = 'verilog', extensions = '.v', comment_delimiters = '//', multiline_comment_delimiters = {'/*': '*/'} string_delimiters = {'"': '"'} encapsulators = {'(': ')', '[': ']', '{': '}'} string_delimiter_esca...
1,590
Python
.py
29
47.827586
79
0.537524
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,018
DocumentationExtraction.py
coala_coala/coalib/bearlib/languages/documentation/DocumentationExtraction.py
""" Language and docstyle independent extraction of documenation comments. Each of the functions is built upon one another, and at the last, exposes a single function :func:`extract_documentation_with_markers` which is used by :class:`.DocBaseClass`, to extract documentation. """ import re from coalib.bearlib.langua...
13,594
Python
.py
283
37.144876
79
0.614351
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,019
__init__.py
coala_coala/coalib/bearlib/languages/documentation/__init__.py
""" Provides facilities to extract, parse and assemble documentation comments for different languages and documentation tools. """
131
Python
.py
4
31.75
77
0.834646
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,020
DocstyleDefinition.py
coala_coala/coalib/bearlib/languages/documentation/DocstyleDefinition.py
from collections import Iterable, namedtuple from glob import iglob import os.path from coala_utils.decorators import ( enforce_signature, generate_eq, generate_repr) from coalib.parsing.ConfParser import ConfParser @generate_repr() @generate_eq('language', 'docstyle', 'markers') class DocstyleDefinition: ""...
12,274
Python
.py
264
34.306818
80
0.588708
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,021
DocBaseClass.py
coala_coala/coalib/bearlib/languages/documentation/DocBaseClass.py
from coalib.bearlib.languages.documentation.DocstyleDefinition import ( DocstyleDefinition) from coalib.results.Diff import Diff from coalib.results.TextRange import TextRange from coalib.bearlib.languages.documentation.DocumentationExtraction import ( extract_documentation_with_markers) class DocBaseClass: ...
3,590
Python
.py
74
35.878378
78
0.614902
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,022
DocumentationComment.py
coala_coala/coalib/bearlib/languages/documentation/DocumentationComment.py
from collections import namedtuple from coala_utils.decorators import generate_eq, generate_repr from coalib.results.TextRange import TextRange from functools import lru_cache SPHINX_REF = { 'Attribute': (':attr:`', '`'), 'Class': (':class:`', '`'), 'Constant': (':const:`', '`'), 'Data': (':data:`', ...
14,919
Python
.py
312
35.589744
79
0.590341
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,023
Bear.py
coala_coala/coalib/core/Bear.py
from collections import defaultdict from functools import partial import inspect import logging from os import makedirs from os.path import join, abspath, exists from appdirs import user_data_dir from coala_utils.decorators import (enforce_signature, classproperty, get_public_membe...
15,642
Python
.py
372
33.22043
79
0.618577
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,024
PersistentHash.py
coala_coala/coalib/core/PersistentHash.py
from collections import Iterable from copy import deepcopy from hashlib import sha1 import pickle def order(obj): """ Recursively preserves the order of any sets or dicts found in obj. """ if isinstance(obj, set): return sorted(obj) if isinstance(obj, dict): temp_obj = deepcopy...
1,243
Python
.py
36
27.861111
78
0.638032
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,025
DependencyTracker.py
coala_coala/coalib/core/DependencyTracker.py
from itertools import chain from coalib.core.Graphs import traverse_graph class DependencyTracker: """ A ``DependencyTracker`` allows to register and manage dependencies between objects. This class uses a directed graph to track relations. Add a dependency relation between two objects: >>>...
9,818
Python
.py
267
27.355805
79
0.592101
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,026
Graphs.py
coala_coala/coalib/core/Graphs.py
from coalib.core.CircularDependencyError import CircularDependencyError def traverse_graph(start_nodes, get_successive_nodes, run_on_edge=lambda prev, nxt: None): """ Traverses all edges of a directed, possibly disconnected graph once. Detects cyclic graphs by raising a ``CircularDepend...
2,031
Python
.py
48
33.4375
79
0.600913
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,027
ProjectBear.py
coala_coala/coalib/core/ProjectBear.py
from coalib.core.Bear import Bear from coalib.settings.FunctionMetadata import FunctionMetadata class ProjectBear(Bear): """ This bear base class does not parallelize tasks at all, it runs on the whole file base provided. """ def __init__(self, section, file_dict): """ :param sect...
1,185
Python
.py
30
31.1
79
0.636205
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,028
__init__.py
coala_coala/coalib/core/__init__.py
""" The core package provides an API for coala's NextGen-Core. The ``Core`` module is responsible for maintaining sessions for coala's execution and also running the tasks offloaded by the bears. The ``Bear`` module provides a base class for all the NextGen Bears. ``FileBear`` provides a Bear base class to paralleliz...
993
Python
.py
17
57.176471
78
0.805556
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,029
CircularDependencyError.py
coala_coala/coalib/core/CircularDependencyError.py
class CircularDependencyError(RuntimeError): """ An error identifying a circular dependency. """ def __init__(self, names=None): """ Creates the CircularDependencyError with a helpful message about the dependency. :param names: The names of the nodes that fo...
580
Python
.py
17
25.470588
76
0.593583
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,030
Core.py
coala_coala/coalib/core/Core.py
import asyncio import concurrent.futures import functools import logging from coalib.core.DependencyTracker import DependencyTracker from coalib.core.Graphs import traverse_graph from coalib.core.PersistentHash import persistent_hash from coalib.misc.Compatibility import run_coroutine_threadsafe def group(iterable, ...
18,281
Python
.py
373
37.563003
80
0.597387
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,031
FileBear.py
coala_coala/coalib/core/FileBear.py
from coalib.core.Bear import Bear from coalib.settings.FunctionMetadata import FunctionMetadata class FileBear(Bear): """ This bear base class parallelizes tasks for each file given. """ def __init__(self, section, file_dict): """ :param section: The section object where b...
1,227
Python
.py
30
32.1
79
0.628883
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,032
DependencyBear.py
coala_coala/coalib/core/DependencyBear.py
from coalib.core.Bear import Bear from coalib.settings.FunctionMetadata import FunctionMetadata class DependencyBear(Bear): """ This bear base class parallelizes tasks for each dependency result. You can specify dependency bears with the ``BEAR_DEPS`` field. """ def __init__(self, section, file_...
1,416
Python
.py
32
35.28125
79
0.647785
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,033
GlobalBear.py
coala_coala/coalib/bears/GlobalBear.py
from coalib.bears.Bear import Bear from coalib.bears.BEAR_KIND import BEAR_KIND class GlobalBear(Bear): """ A GlobalBear analyzes semantic facts across several files. The results of a GlobalBear will be presented grouped by the origin Bear. Therefore Results spanning across multiple files are allowed...
1,450
Python
.py
39
27.717949
77
0.612143
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,034
Bear.py
coala_coala/coalib/bears/Bear.py
import inspect import cProfile import pdb import collections import traceback import logging from functools import partial from os import makedirs, getcwd from os.path import join, abspath, exists, isdir import requests from appdirs import user_data_dir from pyprint.Printer import Printer from coala_utils.decorators ...
24,467
Python
.py
552
35.057971
80
0.617945
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,035
meta.py
coala_coala/coalib/bears/meta.py
from collections import defaultdict from coalib.bearlib.aspects.collections import AspectList from coalib.bearlib.languages.Language import Languages from coalib.collecting.Collectors import get_all_languages class bearclass(type): """ Metaclass for :class:`coalib.bears.Bear.Bear` and therefore all bear ...
1,434
Python
.py
31
37.483871
73
0.646132
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,036
LocalBear.py
coala_coala/coalib/bears/LocalBear.py
from coalib.bears.Bear import Bear from coalib.bears.BEAR_KIND import BEAR_KIND from coalib.settings.FunctionMetadata import FunctionMetadata class LocalBear(Bear): """ A LocalBear is a Bear that analyzes only one file at once. It therefore can not analyze semantical facts over multiple files. This h...
1,522
Python
.py
38
31.815789
79
0.654915
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,037
ResultFilter.py
coala_coala/coalib/results/ResultFilter.py
import copy from difflib import SequenceMatcher from coalib.results.Diff import ConflictError, Diff from coalib.results.SourceRange import SourceRange def filter_results(original_file_dict, modified_file_dict, original_results, modified_results): """ F...
9,630
Python
.py
202
36.554455
80
0.613409
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,038
AbsolutePosition.py
coala_coala/coalib/results/AbsolutePosition.py
from coalib.results.TextPosition import TextPosition from coala_utils.decorators import enforce_signature class AbsolutePosition(TextPosition): @enforce_signature def __init__(self, text: (tuple, list, None) = None, position: (int, None) = None): """ Creates ...
2,123
Python
.py
50
33.74
78
0.61068
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,039
SourcePosition.py
coala_coala/coalib/results/SourcePosition.py
from os.path import relpath, abspath from coala_utils.decorators import ( enforce_signature, generate_ordering, generate_repr, get_public_members) from coalib.results.TextPosition import TextPosition @generate_repr('file', 'line', 'column') @generate_ordering('file', 'line', 'column') class SourcePosition(TextPo...
1,582
Python
.py
38
32.5
78
0.603257
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,040
Result.py
coala_coala/coalib/results/Result.py
import uuid from os.path import relpath from coala_utils.decorators import ( enforce_signature, generate_ordering, generate_repr, get_public_members) from coalib.bearlib.aspects import aspectbase from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from coalib.results.SourceRange import SourceRange # Omit ...
13,328
Python
.py
315
29.885714
80
0.567299
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,041
Diff.py
coala_coala/coalib/results/Diff.py
import copy import difflib import logging from unidiff import PatchSet from coalib.results.LineDiff import LineDiff, ConflictError from coalib.results.SourceRange import SourceRange from coalib.results.TextRange import TextRange from coala_utils.decorators import enforce_signature, generate_eq @generate_eq('_file',...
22,603
Python
.py
513
32.103314
79
0.554124
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,042
LineDiff.py
coala_coala/coalib/results/LineDiff.py
import collections from coala_utils.decorators import generate_repr class ConflictError(Exception): pass @generate_repr('change', 'delete', 'add_after') class LineDiff: """ A LineDiff holds the difference between two strings. """ def __init__(self, change=False, delete=False, add_after=False):...
2,418
Python
.py
60
30.95
79
0.617258
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,043
SourceRange.py
coala_coala/coalib/results/SourceRange.py
from os.path import relpath from coala_utils.decorators import enforce_signature, get_public_members from coalib.results.SourcePosition import SourcePosition from coalib.results.TextRange import TextRange from coalib.results.AbsolutePosition import AbsolutePosition class SourceRange(TextRange): @enforce_signatu...
7,780
Python
.py
162
35.851852
80
0.566473
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,044
TextPosition.py
coala_coala/coalib/results/TextPosition.py
from coala_utils.decorators import ( enforce_signature, generate_ordering, generate_repr) class ZeroOffsetError(ValueError): pass @generate_repr('line', 'column') @generate_ordering('line', 'column') class TextPosition: @enforce_signature def __init__(self, line: (int, None) = None, column: (int, N...
3,082
Python
.py
76
29.973684
78
0.570569
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,045
TextRange.py
coala_coala/coalib/results/TextRange.py
import copy from coala_utils.decorators import ( enforce_signature, generate_ordering, generate_repr) from coalib.results.TextPosition import TextPosition @generate_repr('start', 'end') @generate_ordering('start', 'end') class TextRange: @enforce_signature def __init__(self, start: TextPosition, end: (T...
4,459
Python
.py
96
33.96875
80
0.568993
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,046
HiddenResult.py
coala_coala/coalib/results/HiddenResult.py
from coalib.results.Result import Result from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from coalib.bearlib.aspects import aspectbase from coala_utils.decorators import ( enforce_signature, generate_ordering, generate_repr) @generate_repr(('id', hex), 'origin', 'message',...
3,347
Python
.py
82
27.670732
80
0.552147
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,047
RESULT_SEVERITY.py
coala_coala/coalib/results/RESULT_SEVERITY.py
from coalib.misc.Enum import enum RESULT_SEVERITY = enum('INFO', 'NORMAL', 'MAJOR') RESULT_SEVERITY.__str__ = lambda x: RESULT_SEVERITY.reverse.get(x, 'NORMAL') RESULT_SEVERITY_COLORS = {RESULT_SEVERITY.INFO: 'green', RESULT_SEVERITY.NORMAL: 'yellow', RESULT_SEVERITY...
335
Python
.py
6
46
76
0.631098
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,048
IgnoreResultAction.py
coala_coala/coalib/results/result_actions/IgnoreResultAction.py
from coalib.bearlib.languages import Language from coalib.bearlib.languages.Language import UnknownLanguageError from coalib.results.result_actions.ResultAction import ResultAction from coalib.results.Result import Result from coalib.results.Diff import Diff from coala_utils.FileUtils import detect_encoding from os.pat...
4,549
Python
.py
96
35.354167
80
0.609068
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,049
ShowAppliedPatchesAction.py
coala_coala/coalib/results/result_actions/ShowAppliedPatchesAction.py
from coalib.results.result_actions.ResultAction import ResultAction from coalib.results.result_actions.ShowPatchAction import ShowPatchAction from coalib.results.RESULT_SEVERITY import ( RESULT_SEVERITY, RESULT_SEVERITY_COLORS) from pyprint.ConsolePrinter import ConsolePrinter def format_lines(lines, symbol='', l...
2,180
Python
.py
46
33.434783
78
0.549389
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,050
PrintDebugMessageAction.py
coala_coala/coalib/results/result_actions/PrintDebugMessageAction.py
from coalib.results.Result import Result from coalib.results.result_actions.ResultAction import ResultAction from coala_utils.decorators import enforce_signature class PrintDebugMessageAction(ResultAction): @staticmethod @enforce_signature def is_applicable(result: Result, original...
699
Python
.py
19
27.578947
67
0.639466
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,051
DoNothingAction.py
coala_coala/coalib/results/result_actions/DoNothingAction.py
from coalib.results.result_actions.ResultAction import ResultAction class DoNothingAction(ResultAction): SUCCESS_MESSAGE = '' is_applicable = staticmethod(lambda *args: True) def apply(self, result, original_file_dict, file_diff_dict): """ Do (N...
340
Python
.py
11
22.363636
67
0.614198
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,052
AlternatePatchAction.py
coala_coala/coalib/results/result_actions/AlternatePatchAction.py
from coalib.results.Result import Result from coalib.results.result_actions.ResultAction import ResultAction from coalib.results.result_actions.ShowPatchAction import ShowPatchAction class AlternatePatchAction(ResultAction): SUCCESS_MESSAGE = 'Displayed patch successfully.' def __init__(self, diffs, count):...
1,451
Python
.py
32
31.96875
73
0.589943
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,053
PrintAspectAction.py
coala_coala/coalib/results/result_actions/PrintAspectAction.py
from coalib.results.Result import Result from coalib.results.result_actions.ResultAction import ResultAction from coala_utils.decorators import enforce_signature class PrintAspectAction(ResultAction): @staticmethod @enforce_signature def is_applicable(result: Result, original_file_...
792
Python
.py
20
30.1
67
0.642298
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,054
PrintMoreInfoAction.py
coala_coala/coalib/results/result_actions/PrintMoreInfoAction.py
from coalib.results.Result import Result from coalib.results.result_actions.ResultAction import ResultAction from coala_utils.decorators import enforce_signature class PrintMoreInfoAction(ResultAction): @staticmethod @enforce_signature def is_applicable(result: Result, original_fil...
705
Python
.py
19
27.894737
67
0.642647
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,055
GeneratePatchesAction.py
coala_coala/coalib/results/result_actions/GeneratePatchesAction.py
from pygments.lexers import guess_lexer_for_filename from pyprint.ConsolePrinter import ConsolePrinter from coalib.results.result_actions.ResultAction import ResultAction from coalib.results.result_actions.ShowPatchAction import ShowPatchAction from coalib.output.printers.LogPrinter import LogPrinter from coalib.parsi...
3,087
Python
.py
70
36.414286
80
0.658969
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,056
__init__.py
coala_coala/coalib/results/result_actions/__init__.py
""" The result_actions package holds objects deriving from ResultAction. A ResultAction represents an action that an be applied to a result. """
145
Python
.py
4
35.25
68
0.808511
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,057
ResultAction.py
coala_coala/coalib/results/result_actions/ResultAction.py
""" A ResultAction is an action that is applicable to at least some results. This file serves the base class for all result actions, thus providing a unified interface for all actions. """ from coala_utils.decorators import enforce_signature from coalib.settings.FunctionMetadata import FunctionMetadata from coalib.sett...
3,939
Python
.py
78
36.115385
79
0.574955
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,058
OpenEditorAction.py
coala_coala/coalib/results/result_actions/OpenEditorAction.py
import logging import shlex import subprocess from os.path import exists from os import environ from coalib.results.Diff import Diff from coalib.results.Result import Result from coalib.results.result_actions.ResultAction import ResultAction from coala_utils.decorators import enforce_signature from coala_utils.FileUti...
7,025
Python
.py
192
27.25
79
0.567401
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,059
ShowPatchAction.py
coala_coala/coalib/results/result_actions/ShowPatchAction.py
import difflib from os.path import relpath, join from pyprint.ConsolePrinter import ConsolePrinter from coalib.results.Diff import ConflictError from coalib.results.Result import Result from coalib.results.result_actions.ResultAction import ResultAction from coala_utils.decorators import enforce_signature def form...
4,944
Python
.py
105
32.780952
79
0.548608
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,060
ApplyPatchAction.py
coala_coala/coalib/results/result_actions/ApplyPatchAction.py
import shutil from os.path import isfile from os import remove from coala_utils.FileUtils import detect_encoding from coalib.results.result_actions.ShowPatchAction import ShowPatchAction from coalib.results.result_actions.ResultAction import ResultAction class ApplyPatchAction(ResultAction): SUCCESS_MESSAGE = ...
2,105
Python
.py
46
30.76087
80
0.562072
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,061
conftest.py
coala_coala/tests/conftest.py
# Allow import to fail to avoid annoying developers try: from pytest_reqs import check_requirements except ImportError: check_requirements = None if check_requirements: def pytest_collection_modifyitems(config, session, items): check_requirements(config, session, items)
293
Python
.py
8
32.875
62
0.784452
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,062
TestUtilities.py
coala_coala/tests/TestUtilities.py
from contextlib import contextmanager import os import sys import unittest.mock from coala_utils.ContextManagers import retrieve_stdout, retrieve_stderr # This list is sorted alphabetically TEST_BEAR_NAMES = ( 'AspectsGeneralTestBear', 'AspectTestBear', 'DependentBear', 'EchoBear', 'ErrorTestBear'...
4,199
Python
.py
131
26.183206
80
0.637216
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,063
coalaCITest.py
coala_coala/tests/coalaCITest.py
import os import sys import unittest from coalib import coala, coala_ci from coala_utils.ContextManagers import prepare_file from tests.TestUtilities import bear_test_module, execute_coala class coalaCITest(unittest.TestCase): def setUp(self): self.old_argv = sys.argv def tearDown(self): sy...
10,817
Python
.py
215
32.339535
80
0.492295
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,064
coalaDebugTest.py
coala_coala/tests/coalaDebugTest.py
import os import sys import unittest from unittest.mock import patch from coalib.coala_main import run_coala from coalib.output.printers.LogPrinter import LogPrinter from coalib import coala from pyprint.ConsolePrinter import ConsolePrinter from coala_utils.ContextManagers import prepare_file from coalib.output.Loggi...
4,372
Python
.py
91
27.868132
80
0.453608
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,065
coalaDeleteOrigTest.py
coala_coala/tests/coalaDeleteOrigTest.py
import tempfile import unittest import os from coalib import coala_delete_orig from coala_utils.ContextManagers import retrieve_stderr from coalib.parsing.DefaultArgParser import PathArg from coalib.settings.Section import Section from coalib.settings.Setting import Setting class coalaDeleteOrigTest(unittest.TestCas...
1,967
Python
.py
43
36.744186
71
0.66858
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,066
__init__.py
coala_coala/tests/__init__.py
import locale import platform try: lc = locale.getlocale() ps = platform.system() if ps != 'Windows' and lc == (None, None): locale.setlocale(locale.LC_ALL, 'C.UTF-8') except (ValueError, UnicodeError): locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
276
Python
.py
9
26.777778
50
0.675472
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,067
coalaFormatTest.py
coala_coala/tests/coalaFormatTest.py
import os import sys import unittest from coalib import coala, coala_format from coala_utils.ContextManagers import prepare_file from tests.TestUtilities import bear_test_module, execute_coala class coalaFormatTest(unittest.TestCase): def setUp(self): self.old_argv = sys.argv def tearDown(self): ...
2,895
Python
.py
55
32.963636
80
0.477923
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,068
coalaDebugFlagTest.py
coala_coala/tests/coalaDebugFlagTest.py
import os import sys import unittest from unittest.mock import MagicMock, patch from coalib import coala from coala_utils.ContextManagers import prepare_file from tests.TestUtilities import execute_coala, bear_test_module # patch gets strangely lost when only defined in method or with context where # actually need...
5,237
Python
.py
107
34.813084
79
0.557425
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,069
coalaTest.py
coala_coala/tests/coalaTest.py
import os import re import sys import unittest import unittest.mock from pkg_resources import VersionConflict from coalib.coala_main import run_coala from coalib.output.printers.LogPrinter import LogPrinter from coalib import assert_supported_version, coala from pyprint.ConsolePrinter import ConsolePrinter from coala_...
18,604
Python
.py
367
31.414169
80
0.47707
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,070
coalaJSONTest.py
coala_coala/tests/coalaJSONTest.py
import json import os import sys import unittest import unittest.mock from pkg_resources import VersionConflict from coalib import coala, coala_json from coala_utils.ContextManagers import prepare_file from tests.TestUtilities import ( bear_test_module, execute_coala, TEST_BEAR_NAMES, TEST_BEARS_COUNT,...
7,907
Python
.py
164
33.79878
80
0.527544
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,071
GlobbingTest.py
coala_coala/tests/parsing/GlobbingTest.py
""" Tests Globbing and related functions Test Files are local and permanent and organized as follows: GlobTestDir ├── SubDir1 │ ├── File11.py │ └── File12.py │ SubDir2 │ ├── File(with)parentheses.txt │ └── File[with]brackets.txt ├── File1.x ├── File2.y └── File3.z """ import os import re import unittest from...
12,953
Python
.py
326
28.791411
79
0.517616
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,072
LineParserTest.py
coala_coala/tests/parsing/LineParserTest.py
import unittest import logging from coalib.parsing.LineParser import LineParser class LineParserTest(unittest.TestCase): def setUp(self): self.uut = LineParser(comment_separators=('#', ';')) def test_empty_line(self): self.check_data_set('') self.check_data_set('\n \n \n') def ...
5,723
Python
.py
107
35.457944
79
0.464535
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,073
DefaultArgParserTest.py
coala_coala/tests/parsing/DefaultArgParserTest.py
import argparse import re import unittest from unittest.mock import patch, Mock # Imported and unused here, to ensure an ImportError occurs here # instead of inside coalib. Please install it for the test to pass. import argcomplete import coalib.parsing.DefaultArgParser from coalib.collecting.Collectors import get_...
3,865
Python
.py
84
35.369048
77
0.62234
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,074
FilterTest.py
coala_coala/tests/parsing/FilterTest.py
import unittest from coalib import coala from coalib.parsing.filters import available_filters from tests.TestUtilities import ( bear_test_module, execute_coala, TEST_BEARS_COUNT, C_BEARS_COUNT, ) from tests.test_bears.TestBear import TestBear from coalib.parsing.filters.decorators import typed_filter f...
7,932
Python
.py
169
35.751479
79
0.590291
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,075
CliParsingTest.py
coala_coala/tests/parsing/CliParsingTest.py
import argparse import unittest from coalib.parsing.CliParsing import parse_cli, check_conflicts class CliParserTest(unittest.TestCase): def setUp(self): self.test_arg_parser = argparse.ArgumentParser() self.test_arg_parser.add_argument('-t', nargs='+', dest='test') self.test_arg_parser....
3,059
Python
.py
67
32.701493
79
0.545455
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,076
ConfParserTest.py
coala_coala/tests/parsing/ConfParserTest.py
import os import tempfile import unittest from collections import OrderedDict import logging from coalib.parsing.ConfParser import ConfParser from coalib.settings.Section import Section class ConfParserTest(unittest.TestCase): example_file = """setting = without_section [foo] to be ignored a_default,...
8,288
Python
.py
197
30.878173
78
0.568998
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,077
FilterHelperTest.py
coala_coala/tests/parsing/FilterHelperTest.py
import unittest from coalib.parsing.FilterHelper import ( apply_filter, apply_filters, is_valid_filter, _filter_section_bears ) from coalib.parsing.filters import available_filters from coalib.parsing.InvalidFilterException import InvalidFilterException from coalib.settings.ConfigurationGathering impor...
3,838
Python
.py
79
39.303797
78
0.640771
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,078
ProcessingTest.py
coala_coala/tests/processes/ProcessingTest.py
import copy import logging import multiprocessing import os import platform import queue import subprocess import sys import unittest from pyprint.ConsolePrinter import ConsolePrinter from testfixtures import LogCapture, StringComparison from coalib.bears.Bear import Bear from coalib.output.printers.LogPrinter impor...
37,980
Python
.py
759
34.227931
80
0.535686
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,079
BearRunningTest.py
coala_coala/tests/processes/BearRunningTest.py
import multiprocessing import queue import unittest from coalib.bears.GlobalBear import GlobalBear from coalib.bears.LocalBear import LocalBear from coalib.processes.BearRunning import ( LOG_LEVEL, LogMessage, run, send_msg, task_done) from coalib.processes.CONTROL_ELEMENT import CONTROL_ELEMENT from coalib.result...
13,941
Python
.py
326
27.815951
78
0.535145
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,080
LogPrinterThreadTest.py
coala_coala/tests/processes/LogPrinterThreadTest.py
import queue import unittest from testfixtures import LogCapture from coalib.processes.LogPrinterThread import LogPrinterThread class LogPrinterThreadTest(unittest.TestCase): def test_run(self): log_queue = queue.Queue() self.uut = LogPrinterThread(log_queue) log_queue.put(item='Sample ...
879
Python
.py
23
29.347826
62
0.618096
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,081
LogMessageTest.py
coala_coala/tests/processes/communication/LogMessageTest.py
import unittest from datetime import datetime from coalib.misc import Constants from coalib.output.printers.LOG_LEVEL import LOG_LEVEL from coalib.processes.communication.LogMessage import LogMessage class LogMessageTest(unittest.TestCase): timestamp = datetime.today() def setUp(self): self.uut = Lo...
3,064
Python
.py
63
35.761905
75
0.589632
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,082
ProcessingLocalTestBear.py
coala_coala/tests/processes/section_executor_test_files/ProcessingLocalTestBear.py
import time from coalib.bears.LocalBear import LocalBear from coalib.results.Result import Result class ProcessingLocalTestBear(LocalBear): def run(self, filename, file): # we need to test that the SectionExecutor holds back the global # results until processing of all local ones is finished ...
395
Python
.py
9
38.444444
72
0.746073
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,083
ProcessingGlobalTestBear.py
coala_coala/tests/processes/section_executor_test_files/ProcessingGlobalTestBear.py
from coalib.bears.GlobalBear import GlobalBear from coalib.results.Result import Result class ProcessingGlobalTestBear(GlobalBear): def run(self): for filename in self.file_dict: return [Result.from_values('GlobalTestBear', 'test message', ...
356
Python
.py
8
30.375
56
0.594203
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,084
ProcessingLocalTestRawFileBear.py
coala_coala/tests/processes/section_executor_test_files/ProcessingLocalTestRawFileBear.py
import time from coalib.bears.LocalBear import LocalBear from coalib.results.Result import Result class ProcessingLocalTestRawFileBear(LocalBear): USE_RAW_FILES = True def run(self, filename, file): # we need to test that the SectionExecutor holds back the global # results until processing ...
431
Python
.py
10
37.6
72
0.745192
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,085
ProcessingGlobalTestRawFileBear.py
coala_coala/tests/processes/section_executor_test_files/ProcessingGlobalTestRawFileBear.py
from coalib.bears.GlobalBear import GlobalBear from coalib.results.Result import Result class ProcessingGlobalTestRawFileBear(GlobalBear): USE_RAW_FILES = True def run(self): for filename in self.file_dict: return [Result.from_values('GlobalTestRawBear', ...
392
Python
.py
9
30.333333
59
0.60686
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,086
FileTest.py
coala_coala/tests/io/FileTest.py
import os import unittest from coalib.io.File import File TEST_FILE_DIR = os.path.join(os.path.split(__file__)[0], 'file_test_files') def get_path_components(filepath): """ Splits the filepath into components to provide a unique test results that passes on all CIs. """ ...
1,842
Python
.py
42
35.952381
78
0.644058
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,087
FileProxyTest.py
coala_coala/tests/io/FileProxyTest.py
import os import unittest from coala_utils.ContextManagers import make_temp, prepare_file from coalib.io.FileProxy import ( FileProxy, FileProxyMap, FileDictGenerator) class FileProxyTest(unittest.TestCase): def test_fileproxy_relative_name(self): with prepare_file(['coala'], None) as (_, file): ...
7,736
Python
.py
152
40.065789
76
0.624219
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,088
DirectoryTest.py
coala_coala/tests/io/DirectoryTest.py
import os import unittest from coalib.io.Directory import Directory class DirectoryTest(unittest.TestCase): def setUp(self): self.test_dir_path = os.path.join(os.path.dirname(__file__), 'DirectoryTestDir') self.another_test_dir_path = os.path.join(os.pat...
1,178
Python
.py
24
38.291667
78
0.637238
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,089
LinterBear.py
coala_coala/tests/test_bears/LinterBear.py
from coalib.bearlib.abstractions.Linter import linter @linter(executable='echo', output_format='regex', output_regex=r'.+:(?P<line>\d+):(?P<message>.*)') class EchoBear: CAN_DETECT = {'Syntax', 'Security'} CAN_FIX = {'Redundancy'} """ A simple bear to test that collectors are importing...
580
Python
.py
15
33.4
75
0.679144
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,090
TestBearDep.py
coala_coala/tests/test_bears/TestBearDep.py
from coalib.bears.LocalBear import LocalBear class TestDepBearA(LocalBear): def run(self, filename, file, settings1='', settings2=''): yield [settings1, settings2] class TestDepBearAA(LocalBear): def run(self, filename, file, settings3='', settings4=''): yield [settings3, settings4] clas...
1,209
Python
.py
25
41.52
69
0.713551
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,091
JavaTestBear.py
coala_coala/tests/test_bears/JavaTestBear.py
from coalib.bears.LocalBear import LocalBear class JavaTestBear(LocalBear): LANGUAGES = {'java'} LICENSE = 'AGPL-3.0' CAN_DETECT = {'Syntax', 'Formatting'} CAN_FIX = {'Security'} def run(self, filename, file, config: str = ''): """ Bear to test that collecting of languages works. ...
387
Python
.py
11
29.090909
56
0.637097
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,092
LineCountTestBear.py
coala_coala/tests/test_bears/LineCountTestBear.py
from coalib.bears.LocalBear import LocalBear from coalib.results.Result import Result from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY class LineCountTestBear(LocalBear): LANGUAGES = {'all'} def run(self, filename, file): """ Counts the lines of each file. """ yield...
493
Python
.py
14
27.642857
58
0.661053
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,093
TestBear.py
coala_coala/tests/test_bears/TestBear.py
from coalib.bears.LocalBear import LocalBear class TestBear(LocalBear): def run(self, filename, file, result=False, exception: bool = False): if result is True: if file: for line in file: yield line yield True elif result is not False: ...
430
Python
.py
13
21.923077
73
0.564165
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,094
AspectsGeneralTestBear.py
coala_coala/tests/test_bears/AspectsGeneralTestBear.py
from coalib.bears.LocalBear import LocalBear from coalib.results.Result import Result from coalib.bearlib.aspects import map_setting_to_aspect from coalib.bearlib.aspects.Formatting import ( Formatting, LineLength, ) from coalib.bearlib.aspects import ( AspectList, get as get_aspect, ) class AspectsGe...
1,223
Python
.py
40
20
71
0.535593
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,095
RaiseTestBear.py
coala_coala/tests/test_bears/RaiseTestBear.py
from coalib.bears.LocalBear import LocalBear class RaiseTestBear(LocalBear): """ Just raises an exception (default ``RuntimeError``) when run. """ @staticmethod def create_arguments(filename, file, config_file): return () def run(self, filename, file, cls: str = 'RuntimeEr...
904
Python
.py
29
24.172414
67
0.598389
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,096
AspectTestBear.py
coala_coala/tests/test_bears/AspectTestBear.py
from coalib.bearlib.aspects import Root from coalib.bears.LocalBear import LocalBear from coalib.results.Result import Result from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY class AspectTestBear( LocalBear, aspects={ 'detect': [ Root.Redundancy.UnusedVariable.Unu...
947
Python
.py
27
26.222222
76
0.628821
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,097
ErrorTestBear.py
coala_coala/tests/test_bears/ErrorTestBear.py
from coalib.bearlib.abstractions.Linter import linter @linter(executable='I_do_not_exist', output_format='regex', output_regex=r'.+:(?P<line>\d+):(?P<message>.*)') class ErrorTestBear: """ Causes error when run due to missing executable. """ @staticmethod def create_arguments(filen...
363
Python
.py
11
27.818182
57
0.665714
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,098
SpaceConsistencyTestBear.py
coala_coala/tests/test_bears/internal_folder/SpaceConsistencyTestBear.py
from coalib.bearlib.spacing.SpacingHelper import SpacingHelper from coalib.bears.LocalBear import LocalBear from coalib.results.Diff import Diff from coalib.results.Result import Result class SpaceConsistencyTestBear(LocalBear): def run(self, filename, file, use_spaces: bool, ...
3,103
Python
.py
64
31.9375
79
0.525083
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)
37,099
DependentBear.py
coala_coala/tests/test_bears/internal_folder/DependentBear.py
from coalib.bears.LocalBear import LocalBear from tests.test_bears.internal_folder.SpaceConsistencyTestBear import ( SpaceConsistencyTestBear) class DependentBear(LocalBear): BEAR_DEPS = {SpaceConsistencyTestBear}
224
Python
.py
5
41.8
71
0.847926
coala/coala
3,548
1,308
834
AGPL-3.0
9/5/2024, 5:15:29 PM (Europe/Amsterdam)