|
1 |
| -# Standard library |
2 |
| -import re |
3 |
| - |
4 |
| -default_app_config = "legal_tools.apps.LegalToolsConfig" |
5 |
| - |
6 |
| -FREEDOM_LEVEL_MAX = 1 |
7 |
| -FREEDOM_LEVEL_MID = 2 |
8 |
| -FREEDOM_LEVEL_MIN = 3 |
9 |
| - |
10 |
| -FREEDOM_COLORS = { |
11 |
| - FREEDOM_LEVEL_MIN: "red", |
12 |
| - FREEDOM_LEVEL_MID: "yellow", |
13 |
| - FREEDOM_LEVEL_MAX: "green", |
14 |
| -} |
15 |
| -MISSING_LICENSES = [ |
16 |
| - "http://creativecommons.org/licenses/by-nc/2.1/", |
17 |
| - "http://creativecommons.org/licenses/by-nd/2.1/", |
18 |
| - "http://creativecommons.org/licenses/by-nc-nd/2.1/", |
19 |
| - "http://creativecommons.org/licenses/by-sa/2.1/", |
20 |
| - "http://creativecommons.org/licenses/by-nc-sa/2.1/", |
21 |
| - "http://creativecommons.org/licenses/nc/2.0/", |
22 |
| - "http://creativecommons.org/licenses/nc-sa/2.0/", |
23 |
| - "http://creativecommons.org/licenses/by/2.1/", |
24 |
| - "http://creativecommons.org/licenses/nd-nc/2.0/", |
25 |
| - "http://creativecommons.org/licenses/by-nd-nc/2.0/", |
26 |
| - "http://creativecommons.org/licenses/nd/2.0/", |
27 |
| - "http://creativecommons.org/licenses/sa/2.0/", |
28 |
| -] |
29 |
| - |
30 |
| -# These mostly APPEAR to have the format X.Y, where X and Y are digits. |
31 |
| -# To be forgiving, we accept any mix of digits and ".". |
32 |
| -# There's also at least one with an empty version (MIT). |
33 |
| -VERSION_REGEX_STRING = r"[0-9.]+|" |
34 |
| -VERSION_REGEX = re.compile(VERSION_REGEX_STRING) |
0 commit comments