Passed
Push — master ( 464540...eb55fd )
by Yohann
04:00 queued 12s
created

utils.get_last_q_hour()   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
from time import time
2
3
QUARTER_HOUR: int = 900
4
SALARIED_ROLE_ID: int = 888527962935296091
5
PDG_ROLE_ID: int = 888527789794422784
6
7
8
def word_capitalize(word: str) -> str:
9
    """Capitalize the first letter of every word within a sentence."""
10
    return ' '.join(map(str.capitalize, word.split()))
11
12
13
def get_int(string):
14
    return int(''.join(ch for ch in string if ch.isdigit()))
15
16
17
def get_last_q_hour():
18
    current_sec = time()
19
    return int(current_sec - (current_sec % QUARTER_HOUR))
20