From 9858df3b4538387c7713e7506731cbd2196a8ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eucl=C3=A9cio=20Josias=20Rodrigues?= Date: Mon, 23 Nov 2020 12:37:20 -0300 Subject: [PATCH] fix: ajustes do flake8 --- setup.cfg | 2 +- tests/fixture/flake8.log | 2 +- tests/test_main.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index d49cc3d..103ee47 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [flake8] exclude = .git,__pycache__,.venv -max-complexity = 5 +max-complexity = 10 max-line-length = 120 verbose = 0 diff --git a/tests/fixture/flake8.log b/tests/fixture/flake8.log index ce71a1f..b44a42f 100644 --- a/tests/fixture/flake8.log +++ b/tests/fixture/flake8.log @@ -5,4 +5,4 @@ ./python/scripts/main.py:33:28: E711 comparison to None should be 'if cond is None:' ./python/scripts/main.py:40:22: F841 local variable 'datetime_object' is assigned to but never used ./python/scripts/main.py:48:0: W292 no newline at end of file -./python/scripts/main.py:52:13: W291 trailing whitespace \ No newline at end of file +./python/scripts/main.py:52:13: W291 trailing whitespace diff --git a/tests/test_main.py b/tests/test_main.py index a2bb133..0b3607b 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,7 +1,6 @@ import os import tempfile import pytest -import json from unittest.mock import MagicMock from src import main from github.GithubException import UnknownObjectException @@ -131,6 +130,7 @@ def test_build_comment_with_1_error_0_warning_found(): assert '### Foi encontrado 1 erro.\n' in comment assert '### Nenhum aviso foi encontrado.\n' in comment + def test_build_comment_with_0_error_1_warning_found(): feedback = { 'error': {