mirror of
https://github.com/Balshgit/different
synced 2025-09-11 02:50:41 +03:00
update poetry to 1.1.11
This commit is contained in:
parent
f23f2beb65
commit
67c78c0632
@ -1,6 +1,5 @@
|
||||
import datetime
|
||||
from functools import wraps
|
||||
from datetime import datetime
|
||||
import time
|
||||
|
||||
|
||||
def func_exec_count(func):
|
||||
@ -19,10 +18,10 @@ def execution_time(time_form='sec'):
|
||||
def wrapper(func):
|
||||
@wraps(func)
|
||||
def new_func(*args, **kwargs):
|
||||
begin = datetime.now()
|
||||
begin = time.time()
|
||||
result = func(*args, **kwargs)
|
||||
end = datetime.now()
|
||||
exec_time = (end - begin).seconds / multiply[time_form]
|
||||
end = time.time()
|
||||
exec_time = (end - begin) / multiply[time_form]
|
||||
print(f'Duration, {time_form}: {exec_time}')
|
||||
return result
|
||||
return new_func
|
||||
@ -30,16 +29,16 @@ def execution_time(time_form='sec'):
|
||||
|
||||
|
||||
@func_exec_count
|
||||
@execution_time()
|
||||
# @execution_time()
|
||||
def summary(x: int, y: int) -> int:
|
||||
z = x + y
|
||||
return z
|
||||
|
||||
|
||||
@execution_time(time_form='min')
|
||||
@execution_time(time_form='sec')
|
||||
def main():
|
||||
result = 0
|
||||
for i in range(1, 11):
|
||||
for i in range(1, 10**7):
|
||||
result += summary(i, 100)
|
||||
print(result)
|
||||
print(summary.count, summary.__name__)
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM python:3.8.5
|
||||
FROM python:3.9.7
|
||||
|
||||
# python:
|
||||
ENV PYTHONFAULTHANDLER=1 \
|
||||
@ -10,7 +10,7 @@ ENV PYTHONFAULTHANDLER=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=on \
|
||||
PIP_DEFAULT_TIMEOUT=100 \
|
||||
# poetry:
|
||||
POETRY_VERSION=1.1.4 \
|
||||
POETRY_VERSION=1.1.11 \
|
||||
POETRY_NO_INTERACTION=1 \
|
||||
POETRY_VIRTUALENVS_CREATE=false \
|
||||
POETRY_CACHE_DIR='/var/cache/pypoetry' \
|
||||
|
Loading…
x
Reference in New Issue
Block a user