From 55db3ca1367d506f59ecf2f5468714c21a621d71 Mon Sep 17 00:00:00 2001 From: kuntalkumarbasu Date: Thu, 15 Oct 2020 17:08:39 -0400 Subject: [PATCH] mainly lint fixing and make it compatible with latest pylint.testutils modules. --- setup.py | 3 ++- src/pylint_airflow/checkers/operator.py | 2 +- src/pylint_airflow/checkers/xcom.py | 2 +- tests/conftest.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 5c35120..b46d300 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ description="A Pylint plugin to lint Apache Airflow code.", long_description=long_description, long_description_content_type="text/x-rst", - version="0.1.0-alpha.1", + version="0.1.1-alpha.1", packages=find_packages(where="src"), package_dir={"": "src"}, install_requires=requirements, @@ -28,5 +28,6 @@ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", ], ) diff --git a/src/pylint_airflow/checkers/operator.py b/src/pylint_airflow/checkers/operator.py index bee9cf6..83f0b31 100644 --- a/src/pylint_airflow/checkers/operator.py +++ b/src/pylint_airflow/checkers/operator.py @@ -86,7 +86,7 @@ def invalidname(): print("dosomething") # TODO support other values than constants task_id = keyword.value.value continue - elif keyword.arg == "python_callable": + if keyword.arg == "python_callable": python_callable_name = keyword.value.name if var_name != task_id: diff --git a/src/pylint_airflow/checkers/xcom.py b/src/pylint_airflow/checkers/xcom.py index 4732ebe..5e03414 100644 --- a/src/pylint_airflow/checkers/xcom.py +++ b/src/pylint_airflow/checkers/xcom.py @@ -46,7 +46,7 @@ def visit_module(self, node: astroid.Module): if keyword.arg == "python_callable": python_callable = keyword.value.name continue - elif keyword.arg == "task_id": + if keyword.arg == "task_id": task_id = keyword.value.value if python_callable: diff --git a/tests/conftest.py b/tests/conftest.py index e6a1ce8..ff4bbe8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,7 +4,7 @@ import os import pytest -from pylint.test.test_functional import ( +from pylint.testutils import ( LintModuleTest, FunctionalTestFile, multiset_difference,