commit 15cbb53697f730a341509c382ebcd8c99a1a50a2 Author: Goran Mekić Date: Thu Mar 12 15:57:48 2020 +0100 Add autoflake diff --git a/devel/Makefile b/devel/Makefile index 39aebcb815d0..4718d7856e23 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4068,6 +4068,7 @@ SUBDIR += py-atomicwrites SUBDIR += py-atpublic SUBDIR += py-attrs + SUBDIR += py-autoflake SUBDIR += py-automaton SUBDIR += py-avro SUBDIR += py-aws-sam-translator diff --git a/devel/py-autoflake/Makefile b/devel/py-autoflake/Makefile new file mode 100644 index 000000000000..2236b39e30fe --- /dev/null +++ b/devel/py-autoflake/Makefile @@ -0,0 +1,29 @@ +# $FreeBSD$ + +PORTNAME= autoflake +PORTVERSION= 1.3.1 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= meka@tilda.center +COMMENT= Removes unused imports and unused variables from Python code + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyflakes>=1.1.0:devel/py-pyflakes@${PY_FLAVOR} + +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent distutils + +TEST_ENV= PYTHONPATH=${WRKSRC}/src + +NO_ARCH= yes + +do-test: + cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -o addopts= + +.include diff --git a/devel/py-autoflake/distinfo b/devel/py-autoflake/distinfo new file mode 100644 index 000000000000..a4aea36e0574 --- /dev/null +++ b/devel/py-autoflake/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1584024731 +SHA256 (autoflake-1.3.1.tar.gz) = 680cb9dade101ed647488238ccb8b8bfb4369b53d58ba2c8cdf7d5d54e01f95b +SIZE (autoflake-1.3.1.tar.gz) = 17443 diff --git a/devel/py-autoflake/pkg-descr b/devel/py-autoflake/pkg-descr new file mode 100644 index 000000000000..b498f6ef7119 --- /dev/null +++ b/devel/py-autoflake/pkg-descr @@ -0,0 +1,9 @@ +Removes unused imports and unused variables from Python code. It makes use of +pyflakes to do this. + +By default, autoflake only removes unused imports for modules that are part of +the standard library. (Other modules may have side effects that make them +unsafe to remove automatically.) Removal of unused variables is also disabled +by default. + +WWW: https://github.com/myint/autoflake