diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 11:50:53 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 11:50:53 -0500 |
| commit | 290aebdea65a02557706eaeda477fef0437b6a48 (patch) | |
| tree | f87a939169a508a2e943570501b64cc16b411cda /dev-python/mccabe | |
| parent | 6783ddcd4b73d9ce586a71770caed352bec93b16 (diff) | |
| download | baldeagleos-repo-290aebdea65a02557706eaeda477fef0437b6a48.tar.gz baldeagleos-repo-290aebdea65a02557706eaeda477fef0437b6a48.tar.xz baldeagleos-repo-290aebdea65a02557706eaeda477fef0437b6a48.zip | |
Adding metadata
Diffstat (limited to 'dev-python/mccabe')
| -rw-r--r-- | dev-python/mccabe/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/mccabe/files/mccabe-0.7.0-fix-tests-without-hypothesmith.patch | 74 | ||||
| -rw-r--r-- | dev-python/mccabe/mccabe-0.7.0.ebuild | 35 | ||||
| -rw-r--r-- | dev-python/mccabe/metadata.xml | 10 |
4 files changed, 0 insertions, 120 deletions
diff --git a/dev-python/mccabe/Manifest b/dev-python/mccabe/Manifest deleted file mode 100644 index 7d09297cd122..000000000000 --- a/dev-python/mccabe/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST mccabe-0.7.0.tar.gz 9658 BLAKE2B b4664a00d4760e2f662681875b548b67ad76d6b8a0ee46bf160e3232ad75172512ad7b4a99759dc13607cf06f3c772210b76a7051582d0bbd221091772543c07 SHA512 3e4141033c63434fad183f62dece872554302aeee8cb789586ac7d6d748d198799e2797df1d58458f4d431734f8899f11022d76666c848d43e6271304776346d diff --git a/dev-python/mccabe/files/mccabe-0.7.0-fix-tests-without-hypothesmith.patch b/dev-python/mccabe/files/mccabe-0.7.0-fix-tests-without-hypothesmith.patch deleted file mode 100644 index 18728fe59826..000000000000 --- a/dev-python/mccabe/files/mccabe-0.7.0-fix-tests-without-hypothesmith.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff --git a/test_mccabe.py b/test_mccabe.py -index fe6e8d3..14d8012 100644 ---- a/test_mccabe.py -+++ b/test_mccabe.py -@@ -241,37 +241,38 @@ class RegressionTests(unittest.TestCase): - - # This test uses the Hypothesis and Hypothesmith libraries to generate random - # syntatically-valid Python source code and applies McCabe on it. --@settings( -- max_examples=1000, # roughly 1k tests/minute, or half that under coverage -- derandomize=False, # deterministic mode to avoid CI flakiness -- deadline=None, # ignore Hypothesis' health checks; we already know that -- suppress_health_check=HealthCheck.all(), # this is slow and filter-heavy. --) --@given( -- # Note that while Hypothesmith might generate code unlike that written by -- # humans, it's a general test that should pass for any *valid* source code. -- # (so e.g. running it against code scraped of the internet might also help) -- src_contents=hypothesmith.from_grammar() | hypothesmith.from_node(), -- max_complexity=st.integers(min_value=1), --) --@pytest.mark.skipif(not hypothesmith, reason="hypothesmith could not be imported") --def test_idempotent_any_syntatically_valid_python( -- src_contents: str, max_complexity: int --) -> None: -- """Property-based tests for mccabe. -- -- This test case is based on a similar test for Black, the code formatter. -- Black's test was written by Zac Hatfield-Dodds, the author of Hypothesis -- and the Hypothesmith tool for source code generation. You can run this -- file with `python`, `pytest`, or (soon) a coverage-guided fuzzer Zac is -- working on. -- """ -- -- # Before starting, let's confirm that the input string is valid Python: -- compile(src_contents, "<string>", "exec") # else bug is in hypothesmith -- -- # Then try to apply get_complexity_number to the code... -- get_code_complexity(src_contents, max_complexity) -+if hypothesmith: -+ @settings( -+ max_examples=1000, # roughly 1k tests/minute, or half that under coverage -+ derandomize=False, # deterministic mode to avoid CI flakiness -+ deadline=None, # ignore Hypothesis' health checks; we already know that -+ suppress_health_check=HealthCheck.all(), # this is slow and filter-heavy. -+ ) -+ @given( -+ # Note that while Hypothesmith might generate code unlike that written by -+ # humans, it's a general test that should pass for any *valid* source code. -+ # (so e.g. running it against code scraped of the internet might also help) -+ src_contents=hypothesmith.from_grammar() | hypothesmith.from_node(), -+ max_complexity=st.integers(min_value=1), -+ ) -+ @pytest.mark.skipif(not hypothesmith, reason="hypothesmith could not be imported") -+ def test_idempotent_any_syntatically_valid_python( -+ src_contents: str, max_complexity: int -+ ) -> None: -+ """Property-based tests for mccabe. -+ -+ This test case is based on a similar test for Black, the code formatter. -+ Black's test was written by Zac Hatfield-Dodds, the author of Hypothesis -+ and the Hypothesmith tool for source code generation. You can run this -+ file with `python`, `pytest`, or (soon) a coverage-guided fuzzer Zac is -+ working on. -+ """ -+ -+ # Before starting, let's confirm that the input string is valid Python: -+ compile(src_contents, "<string>", "exec") # else bug is in hypothesmith -+ -+ # Then try to apply get_complexity_number to the code... -+ get_code_complexity(src_contents, max_complexity) - - - if __name__ == "__main__": diff --git a/dev-python/mccabe/mccabe-0.7.0.ebuild b/dev-python/mccabe/mccabe-0.7.0.ebuild deleted file mode 100644 index 354831ad94e5..000000000000 --- a/dev-python/mccabe/mccabe-0.7.0.ebuild +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{13..14} ) -DISTUTILS_USE_PEP517=setuptools - -inherit distutils-r1 pypi - -DESCRIPTION="flake8 plugin: McCabe complexity checker" -HOMEPAGE=" - https://github.com/PyCQA/mccabe/ - https://pypi.org/project/mccabe/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris" - -RDEPEND=" - dev-python/flake8[${PYTHON_USEDEP}] -" - -BDEPEND=" - test? ( - dev-python/hypothesis[${PYTHON_USEDEP}] - ) -" - -PATCHES=( - "${FILESDIR}/${P}-fix-tests-without-hypothesmith.patch" -) - -distutils_enable_tests pytest diff --git a/dev-python/mccabe/metadata.xml b/dev-python/mccabe/metadata.xml deleted file mode 100644 index 5e95859f915a..000000000000 --- a/dev-python/mccabe/metadata.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>python@gentoo.org</email> - <name>Python</name> - </maintainer> - <stabilize-allarches /> - <origin>baldeagleos-repo</origin> -</pkgmetadata> |
