Skip to content

Commit 2acb5ed

Browse files
kmykkyuridenamida
authored andcommitted
.travis.yml に書かれている flake8 が実は動いてなかったので有効にする (kyuridenamida#150)
* Fix the command for flake8 in .travis.yml * Fix codes for flake8
1 parent 7b4305c commit 2acb5ed

File tree

4 files changed

+1
-8
lines changed

4 files changed

+1
-8
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ install:
2020
- pip install codecov nose
2121

2222
script:
23-
- flake8 --ignore=E501, W605
23+
- flake8 --ignore=E501,W503,W605 --exclude=atcodertools/tools/templates/,tests/resources/test_codegen/ atcodertools tests
2424
- autopep8 -r . --exclude 'default_template.py,test_codegen' --diff | tee check_autopep8
2525
- test ! -s check_autopep8
2626
- atcoder-tools gen arc050 --without-login

atcodertools/tools/codegen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def generate_code(atcoder_client: AtCoderClient,
6767
output_file: IOBase):
6868
problem = get_problem_from_url(problem_url)
6969
template_code_path = config.code_style_config.template_file
70-
lang = config.code_style_config.lang
7170

7271
def emit_error(text):
7372
logger.error(with_color(text, Fore.RED))

tests/test_codegen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from atcodertools.codegen.models.code_gen_args import CodeGenArgs
2020
from atcodertools.codegen.template_engine import render
2121
from atcodertools.constprediction.models.problem_constant_set import ProblemConstantSet
22-
from atcodertools.tools.templates import get_default_template_path
2322
from tests.utils.fmtprediction_test_runner import FormatPredictionTestRunner, Response
2423
from tests.utils.gzip_controller import make_tst_data_controller
2524

tests/test_codegen_command.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
class TestCodeGenCommand(unittest.TestCase):
1616

1717
def test_generate_code(self):
18-
answer_data_dir_path = os.path.join(
19-
RESOURCE_DIR,
20-
"test_prepare_workspace")
21-
2218
config_path = os.path.join(RESOURCE_DIR, "test_codegen_command.toml")
2319
answer_file_path = os.path.join(RESOURCE_DIR, "generated_code.cpp")
2420
f1 = io.StringIO()
@@ -38,7 +34,6 @@ def test_generate_code(self):
3834
self.assertEqual(f1.getvalue(), f2.read())
3935

4036
def test_url_parser(self):
41-
dummy_alphabet = "Z"
4237
problem = Problem(Contest("utpc2014"), "Z", "utpc2014_k")
4338
urls = [
4439
"http://utpc2014.contest.atcoder.jp/tasks/utpc2014_k",

0 commit comments

Comments
 (0)