From 5ed496f47111844851dc41e6758caee2a1314a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Sun, 24 Jan 2016 17:53:19 +0100 Subject: [PATCH] Distribution: Remove unneeded `setup_requires` With the new project layout, `pyyaml` is not needed anymore for parsing setup.py. --- setup.py | 2 -- tests/rules/common.py | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index f36989d..7398f09 100644 --- a/setup.py +++ b/setup.py @@ -45,8 +45,6 @@ setup( scripts=['bin/yamllint'], package_data={'yamllint': ['conf/*.yml']}, install_requires=['pyyaml'], - setup_requires=['pyyaml'], # importing `yamllint` (for APP_NAME etc.) - # requires importing `yaml` tests_require=['nose'], test_suite='nose.collector', ) diff --git a/tests/rules/common.py b/tests/rules/common.py index ade842e..ed626d0 100644 --- a/tests/rules/common.py +++ b/tests/rules/common.py @@ -19,8 +19,7 @@ import unittest import yaml from yamllint.config import YamlLintConfig -from yamllint.errors import LintProblem -from yamllint import lint +from yamllint import linter class RuleTestCase(unittest.TestCase): @@ -44,9 +43,9 @@ class RuleTestCase(unittest.TestCase): rule_id = kwargs[key][2] else: rule_id = self.rule_id - expected_problems.append( - LintProblem(kwargs[key][0], kwargs[key][1], rule=rule_id)) + expected_problems.append(linter.LintProblem( + kwargs[key][0], kwargs[key][1], rule=rule_id)) expected_problems.sort() - real_problems = list(lint(source, self.build_fake_config(conf))) + real_problems = list(linter.run(source, self.build_fake_config(conf))) self.assertEqual(real_problems, expected_problems)