Failed Conditions
Pull Request — master (#1978)
by Lasse
01:41
created

coalib/misc/Constants.py (1 issue)

1
# -*- coding: utf-8 -*-
2
3
import os
4
import appdirs
5
6
# Start ignoring PyImportSortBear, PyLintBear as BUS_NAME is imported as a
7
# constant from other files.
8
from coalib import BUS_NAME
1 ignored issue
show
Unused BUS_NAME imported from coalib
Loading history...
9
from coalib import VERSION
10
# Stop ignoring
11
12
13
THIS_IS_A_BUG = ("This is a bug. We are sorry for the inconvenience. "
14
                 "Please contact the developers for assistance.")
15
16
CRASH_MESSAGE = ("An unknown error occurred. This is a bug. We are "
17
                 "sorry for the inconvenience. Please contact the "
18
                 "developers for assistance. During execution of "
19
                 "coala an exception was raised. This should never "
20
                 "happen. When asked for, the following information "
21
                 "may help investigating:")
22
23
VERSION_CONFLICT_MESSAGE = ("There is a conflict in the version of a "
24
                            "dependency you have installed and the "
25
                            "requirements of coala. This may be resolved by "
26
                            "creating a separate virtual environment for "
27
                            "coala or running `pip install %s`. Be aware "
28
                            "that the latter solution might break other "
29
                            "python packages that depend on the currently "
30
                            "installed version.")
31
32
OBJ_NOT_ACCESSIBLE = "{} is not accessible and will be ignored!"
33
34
TRUE_STRINGS = ['1',
35
                "on",
36
                'y',
37
                'yes',
38
                "yeah",
39
                "sure",
40
                'true',
41
                'definitely',
42
                'yup',
43
                "right"]
44
45
FALSE_STRINGS = ['0',
46
                 'off',
47
                 'n',
48
                 'no',
49
                 'nope',
50
                 'nah',
51
                 'false',
52
                 "wrong"]
53
54
# This string contains many unicode characters to challenge tests.
55
COMPLEX_TEST_STRING = ("4 r34l ch4ll3n63: 123 ÄÖü ABc @€¥ §&% {[( ←↓→↑ "
56
                       "ĦŊħ ß°^ \\\n\u2192")
57
58
# Path to the coalib directory
59
coalib_root = os.path.join(os.path.dirname(__file__),
60
                           os.path.pardir)
61
62
# Path to the language definition files
63
language_definitions = os.path.join(coalib_root,
64
                                    "bearlib",
65
                                    "languages",
66
                                    "definitions")
67
68
system_coafile = os.path.join(coalib_root, "default_coafile")
69
70
user_coafile = os.path.join(os.path.expanduser("~"), ".coarc")
71
72
default_coafile = ".coafile"
73
74
TAGS_DIR = appdirs.user_data_dir('coala', version=VERSION)
75
76
GLOBBING_SPECIAL_CHARS = "()[]|?*"
77