From 1ebdafb2b3716b0d3fdf7a39e9b4050120305e4e Mon Sep 17 00:00:00 2001 From: Felipe Monteiro Date: Tue, 3 Jun 2025 15:18:39 -0300 Subject: [PATCH] =?UTF-8?q?Mudan=C3=A7a=20de=20pre=C3=A7os=20e=20algumas?= =?UTF-8?q?=20pequenas=20altera=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run.py | 2 +- src/gerador_relatorio.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/run.py b/run.py index f429dc9..3bcfcaa 100644 --- a/run.py +++ b/run.py @@ -15,7 +15,7 @@ def _obtem_mes_passado() -> int: hoje = date.today() primeiro_dia_mes = hoje.replace(day=1) mes_passado = primeiro_dia_mes - timedelta(days=1) - return int(mes_passado.strftime('%-m')) + return int(mes_passado.strftime('%m')) def _obtem_ano_mes_passado() -> int: diff --git a/src/gerador_relatorio.py b/src/gerador_relatorio.py index 864cd0b..9500b5f 100644 --- a/src/gerador_relatorio.py +++ b/src/gerador_relatorio.py @@ -8,10 +8,10 @@ Dados_Pedidos = namedtuple('Dados_Pedidos', ['data', 'nome', 'valor', 'quantidade']) VALORES_MARMITA = { - 'p': 10, - 'g': 14, - 'ovo': 2, - 'churrasco': 2, + 'p': 13, + 'g': 16, + 'ovo': 1, + 'churrasco': 1, } @@ -24,7 +24,7 @@ def gera_relatorio(mes: int, ano: int, caminho_arquivo: str) -> None: def abre_arquivo_txt(caminho_arquivo: str) -> str: - with open(caminho_arquivo) as f: + with open(caminho_arquivo, encoding='utf-8') as f: return f.read()