Date: Sun, 5 Mar 2023 00:38:25 GMT From: Matthew Seaman <matthew@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 5948bc86943b - main - devel/py-flake8-future-annotations: new port Message-ID: <202303050038.3250cP6O086771@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by matthew: URL: https://cgit.FreeBSD.org/ports/commit/?id=5948bc86943b49d856ce083ecd34facb5f561753 commit 5948bc86943b49d856ce083ecd34facb5f561753 Author: Matthew Seaman <matthew@FreeBSD.org> AuthorDate: 2023-03-04 22:04:18 +0000 Commit: Matthew Seaman <matthew@FreeBSD.org> CommitDate: 2023-03-05 00:38:20 +0000 devel/py-flake8-future-annotations: new port Verifies python 3.7+ files use from __future__ import annotations if a type is used in the module that can be rewritten using PEP 563. Pairs well with pyupgrade with the --py37-plus flag or higher, since pyupgrade only replaces type annotations with the PEP 563 rules if from __future__ import annotations is present. --- devel/Makefile | 1 + devel/py-flake8-future-annotations/Makefile | 22 ++++++++++++++++++++++ devel/py-flake8-future-annotations/distinfo | 3 +++ devel/py-flake8-future-annotations/pkg-descr | 6 ++++++ 4 files changed, 32 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 29207c2a0b0a..f67634c62a0a 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4592,6 +4592,7 @@ SUBDIR += py-flake8-bugbear SUBDIR += py-flake8-builtins SUBDIR += py-flake8-docstrings + SUBDIR += py-flake8-future-annotations SUBDIR += py-flake8-import-order SUBDIR += py-flake8-polyfill SUBDIR += py-flake8-print diff --git a/devel/py-flake8-future-annotations/Makefile b/devel/py-flake8-future-annotations/Makefile new file mode 100644 index 000000000000..b866504a477c --- /dev/null +++ b/devel/py-flake8-future-annotations/Makefile @@ -0,0 +1,22 @@ +PORTNAME= flake8-future-annotations +PORTVERSION= 1.1.0 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= matthew@FreeBSD.org +COMMENT= Verifies python 3.7+ files use from __future__ import annotations +WWW= https://pypi.org/project/flake8-future-annotations/ + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flake8>0:devel/py-flake8@${PY_FLAVOR} + +# The authors claim python 3.7+, but the py-flake8 port requires 3.8+ +USES= python:3.8+ +USE_PYTHON= autoplist concurrent distutils + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/devel/py-flake8-future-annotations/distinfo b/devel/py-flake8-future-annotations/distinfo new file mode 100644 index 000000000000..d2e5cd4f788a --- /dev/null +++ b/devel/py-flake8-future-annotations/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1677965698 +SHA256 (flake8-future-annotations-1.1.0.tar.gz) = df416bd2b9e1eda7ea639a5fd2a083dabb942ffe49d197f836df380d0dcf6608 +SIZE (flake8-future-annotations-1.1.0.tar.gz) = 6832 diff --git a/devel/py-flake8-future-annotations/pkg-descr b/devel/py-flake8-future-annotations/pkg-descr new file mode 100644 index 000000000000..7a055a03df9b --- /dev/null +++ b/devel/py-flake8-future-annotations/pkg-descr @@ -0,0 +1,6 @@ +Verifies python 3.7+ files use from __future__ import annotations if a +type is used in the module that can be rewritten using PEP 563. + +Pairs well with pyupgrade with the --py37-plus flag or higher, since +pyupgrade only replaces type annotations with the PEP 563 rules if +from __future__ import annotations is present.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303050038.3250cP6O086771>