sdispater / pendulum

@@ -177,8 +177,8 @@
Loading
177 177
    # OpenSUSE has a TIMEZONE setting in /etc/sysconfig/clock and
178 178
    # Gentoo has a TIMEZONE setting in /etc/conf.d/clock
179 179
    # We look through these files for a timezone:
180 -
    zone_re = re.compile('\s*ZONE\s*=\s*"')
181 -
    timezone_re = re.compile('\s*TIMEZONE\s*=\s*"')
180 +
    zone_re = re.compile(r'\s*ZONE\s*=\s*"')
181 +
    timezone_re = re.compile(r'\s*TIMEZONE\s*=\s*"')
182 182
    end_re = re.compile('"')
183 183
184 184
    for filename in ("etc/sysconfig/clock", "etc/conf.d/clock"):

@@ -12,21 +12,21 @@
Loading
12 12
13 13
_spec = re.compile(
14 14
    "^"
15 -
    "(?P<std_abbr><.*?>|[^-+,\d]{3,})"
16 -
    "(?P<std_offset>([+-])?(\d{1,2})(:\d{2}(:\d{2})?)?)"
17 -
    "(?P<dst_info>"
18 -
    "    (?P<dst_abbr><.*?>|[^-+,\d]{3,})"
19 -
    "    (?P<dst_offset>([+-])?(\d{1,2})(:\d{2}(:\d{2})?)?)?"
20 -
    ")?"
21 -
    "(?:,(?P<rules>"
22 -
    "    (?P<dst_start>"
23 -
    "        (?:J\d+|\d+|M\d{1,2}.\d.[0-6])"
24 -
    "        (?:/(?P<dst_start_offset>([+-])?(\d+)(:\d{2}(:\d{2})?)?))?"
15 +
    r"(?P<std_abbr><.*?>|[^-+,\d]{3,})"
16 +
    r"(?P<std_offset>([+-])?(\d{1,2})(:\d{2}(:\d{2})?)?)"
17 +
    r"(?P<dst_info>"
18 +
    r"    (?P<dst_abbr><.*?>|[^-+,\d]{3,})"
19 +
    r"    (?P<dst_offset>([+-])?(\d{1,2})(:\d{2}(:\d{2})?)?)?"
20 +
    r")?"
21 +
    r"(?:,(?P<rules>"
22 +
    r"    (?P<dst_start>"
23 +
    r"        (?:J\d+|\d+|M\d{1,2}.\d.[0-6])"
24 +
    r"        (?:/(?P<dst_start_offset>([+-])?(\d+)(:\d{2}(:\d{2})?)?))?"
25 25
    "    )"
26 26
    "    ,"
27 -
    "    (?P<dst_end>"
28 -
    "        (?:J\d+|\d+|M\d{1,2}.\d.[0-6])"
29 -
    "        (?:/(?P<dst_end_offset>([+-])?(\d+)(:\d{2}(:\d{2})?)?))?"
27 +
    r"    (?P<dst_end>"
28 +
    r"        (?:J\d+|\d+|M\d{1,2}.\d.[0-6])"
29 +
    r"        (?:/(?P<dst_end_offset>([+-])?(\d+)(:\d{2}(:\d{2})?)?))?"
30 30
    "    )"
31 31
    "))?"
32 32
    "$",

@@ -11,27 +11,27 @@
Loading
11 11
from pendulum.utils._compat import decode
12 12
13 13
14 -
_MATCH_1 = "\d"
15 -
_MATCH_2 = "\d\d"
16 -
_MATCH_3 = "\d{3}"
17 -
_MATCH_4 = "\d{4}"
18 -
_MATCH_6 = "[+-]?\d{6}"
19 -
_MATCH_1_TO_2 = "\d\d?"
20 -
_MATCH_1_TO_2_LEFT_PAD = "[0-9 ]\d?"
21 -
_MATCH_1_TO_3 = "\d{1,3}"
22 -
_MATCH_1_TO_4 = "\d{1,4}"
23 -
_MATCH_1_TO_6 = "[+-]?\d{1,6}"
24 -
_MATCH_3_TO_4 = "\d{3}\d?"
25 -
_MATCH_5_TO_6 = "\d{5}\d?"
26 -
_MATCH_UNSIGNED = "\d+"
27 -
_MATCH_SIGNED = "[+-]?\d+"
28 -
_MATCH_OFFSET = "[Zz]|[+-]\d\d:?\d\d"
29 -
_MATCH_SHORT_OFFSET = "[Zz]|[+-]\d\d(?::?\d\d)?"
30 -
_MATCH_TIMESTAMP = "[+-]?\d+(\.\d{1,6})?"
14 +
_MATCH_1 = r"\d"
15 +
_MATCH_2 = r"\d\d"
16 +
_MATCH_3 = r"\d{3}"
17 +
_MATCH_4 = r"\d{4}"
18 +
_MATCH_6 = r"[+-]?\d{6}"
19 +
_MATCH_1_TO_2 = r"\d\d?"
20 +
_MATCH_1_TO_2_LEFT_PAD = r"[0-9 ]\d?"
21 +
_MATCH_1_TO_3 = r"\d{1,3}"
22 +
_MATCH_1_TO_4 = r"\d{1,4}"
23 +
_MATCH_1_TO_6 = r"[+-]?\d{1,6}"
24 +
_MATCH_3_TO_4 = r"\d{3}\d?"
25 +
_MATCH_5_TO_6 = r"\d{5}\d?"
26 +
_MATCH_UNSIGNED = r"\d+"
27 +
_MATCH_SIGNED = r"[+-]?\d+"
28 +
_MATCH_OFFSET = r"[Zz]|[+-]\d\d:?\d\d"
29 +
_MATCH_SHORT_OFFSET = r"[Zz]|[+-]\d\d(?::?\d\d)?"
30 +
_MATCH_TIMESTAMP = r"[+-]?\d+(\.\d{1,6})?"
31 31
_MATCH_WORD = (
32 32
    "(?i)[0-9]*"
33 33
    "['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+"
34 -
    "|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}"
34 +
    r"|[\u0600-\u06FF/]+(\s*?[\u0600-\u06FF]+){1,2}"
35 35
)
36 36
_MATCH_TIMEZONE = "[A-za-z0-9-+]+(/[A-Za-z0-9-+_]+)?"
37 37
@@ -39,7 +39,7 @@
Loading
39 39
class Formatter:
40 40
41 41
    _TOKENS = (
42 -
        "\[([^\[]*)\]|\\\(.)|"
42 +
        r"\[([^\[]*)\]|\\(.)|"
43 43
        "("
44 44
        "Mo|MM?M?M?"
45 45
        "|Do|DDDo|DD?D?D?|ddd?d?|do?"
@@ -67,7 +67,7 @@
Loading
67 67
        "Mo": None,
68 68
        "DDDo": None,
69 69
        "Do": lambda locale: tuple(
70 -
            "\d+{}".format(o) for o in locale.get("custom.ordinal").values()
70 +
            r"\d+{}".format(o) for o in locale.get("custom.ordinal").values()
71 71
        ),
72 72
        "dddd": "days.wide",
73 73
        "ddd": "days.abbreviated",
@@ -607,7 +607,7 @@
Loading
607 607
            unit = "month"
608 608
            match = "months.abbreviated"
609 609
        elif token == "Do":
610 -
            parsed["day"] = int(re.match("(\d+)", value).group(1))
610 +
            parsed["day"] = int(re.match(r"(\d+)", value).group(1))
611 611
612 612
            return
613 613
        elif token == "dddd":

@@ -24,21 +24,21 @@
Loading
24 24
    "^"
25 25
    "(?P<date>"
26 26
    "    (?P<classic>"  # Classic date (YYYY-MM-DD)
27 -
    "        (?P<year>\d{4})"  # Year
27 +
    r"        (?P<year>\d{4})"  # Year
28 28
    "        (?P<monthday>"
29 -
    "            (?P<monthsep>[/:])?(?P<month>\d{2})"  # Month (optional)
30 -
    "            ((?P<daysep>[/:])?(?P<day>\d{2}))"  # Day (optional)
29 +
    r"            (?P<monthsep>[/:])?(?P<month>\d{2})"  # Month (optional)
30 +
    r"            ((?P<daysep>[/:])?(?P<day>\d{2}))"  # Day (optional)
31 31
    "        )?"
32 32
    "    )"
33 33
    ")?"
34 34
    # Time (optional)
35 35
    "(?P<time>"
36 -
    "    (?P<timesep>\ )?"  # Separator (space)
37 -
    "    (?P<hour>\d{1,2}):(?P<minute>\d{1,2})?(?::(?P<second>\d{1,2}))?"  # HH:mm:ss (optional mm and ss)
36 +
    r"    (?P<timesep>\ )?"  # Separator (space)
37 +
    r"    (?P<hour>\d{1,2}):(?P<minute>\d{1,2})?(?::(?P<second>\d{1,2}))?"  # HH:mm:ss (optional mm and ss)
38 38
    # Subsecond part (optional)
39 39
    "    (?P<subsecondsection>"
40 40
    "        (?:[.|,])"  # Subsecond separator (optional)
41 -
    "        (?P<subsecond>\d{1,9})"  # Subsecond
41 +
    r"        (?P<subsecond>\d{1,9})"  # Subsecond
42 42
    "    )?"
43 43
    ")?"
44 44
    "$",
Files Coverage
pendulum 91.89%
Project Totals (28 files) 91.89%
87x1icr5jqr18t6e
894.11
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
894.3
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
mb6takxlwv8agiau
0dq2ve85nqtugg53
894.2
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
894.7
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
894.6
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
894.8
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
kv1yucdwm1xljv5i
894.10
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
894.9
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
1
comment: false
2

3
coverage:
4
  status:
5
    patch:
6
      default:
7
        enabled: false
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading