From 99975d0b29e7e88fc3dfc7311a0b082dae7ba85a Mon Sep 17 00:00:00 2001 From: Pavel Kirilin <win10@list.ru> Date: Sun, 8 Aug 2021 08:35:14 +0000 Subject: [PATCH] Lenochka has no secrets now. --- .gitlab-ci.yml | 2 +- lenochka/brain/brain_cell.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 92548c5..6a31a88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -75,4 +75,4 @@ deploy: - kubectl delete configmap --namespace "$NAMESPACE" "$ENVCONF" || true - kubectl create configmap --namespace "$NAMESPACE" "$ENVCONF" --from-env-file=.deploy-env - envsubst < "$HELM_VALUES" > deploy-values.yml - - helm upgrade lenocka deploy/charts/lenocka/ -f deploy-values.yml --namespace "$NAMESPACE" \ No newline at end of file + - helm upgrade lenocka deploy/charts/lenocka/ -f deploy-values.yml --namespace "$NAMESPACE" diff --git a/lenochka/brain/brain_cell.py b/lenochka/brain/brain_cell.py index bab5b7f..c3ef550 100644 --- a/lenochka/brain/brain_cell.py +++ b/lenochka/brain/brain_cell.py @@ -1,5 +1,5 @@ import re -import secrets +import random WORD_PATTERN = re.compile(r"(\w+)") @@ -22,7 +22,7 @@ class BrainCell: :return: The decision. """ - return secrets.randbelow(11) < 1 # noqa: WPS432 + return random.random() < 0.1 # noqa: WPS432 def create_reply(self, sentence: str) -> str: """ -- GitLab