{"id":21942561,"url":"https://github.com/haukex/coverage-simple-excludes","last_synced_at":"2025-04-22T18:34:17.870Z","repository":{"id":257816389,"uuid":"870073752","full_name":"haukex/coverage-simple-excludes","owner":"haukex","description":"Simple `coverage` Exclusions","archived":false,"fork":false,"pushed_at":"2025-03-19T08:56:39.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T17:41:21.884Z","etag":null,"topics":["coverage","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/coverage-simple-excludes/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haukex.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-09T11:54:37.000Z","updated_at":"2025-03-19T08:56:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"661ac6fd-0a45-4802-966a-c960c0cbc665","html_url":"https://github.com/haukex/coverage-simple-excludes","commit_stats":null,"previous_names":["haukex/coverage-simple-excludes"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haukex%2Fcoverage-simple-excludes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haukex%2Fcoverage-simple-excludes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haukex%2Fcoverage-simple-excludes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haukex%2Fcoverage-simple-excludes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haukex","download_url":"https://codeload.github.com/haukex/coverage-simple-excludes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250297920,"owners_count":21407323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coverage","python"],"created_at":"2024-11-29T03:25:28.551Z","updated_at":"2025-04-22T18:34:17.856Z","avatar_url":"https://github.com/haukex.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Simple ``coverage`` Exclusions\n==============================\n\nThis is a simple plugin for [Coverage.py](https://pypi.org/project/coverage/).\nWhen you enable it, for example in `pyproject.toml`:\n\n```toml\n[tool.coverage.run]\nplugins = [\"coverage_simple_excludes\"]\n```\n\nThen, in addition to the default `# pragma: no cover`, you get several more comments in the format\n`# cover-...` that you can use to specify that lines or blocks of code should be excluded from\ncoverage, for example:\n\n```python\nif sys.platform != 'win32':  # cover-not-win32\n    print(\"This code is only executed on non-win32 systems\")\nelse:  # cover-only-win32\n    print(\"This code is only executed on win32 systems\")\n\nif sys.hexversion \u003c 0x03_0C_00_00:  # cover-req-lt3.12\n    print(\"This code is only executed on a version of Python before 3.12\")\nelse:  # cover-req-ge3.12\n    print(\"This code is only executed on Python 3.12 or later\")\n```\n\n- `# cover-req-ltX.Y` and `# cover-req-geX.Y`, where:\n  - `X` and `Y` are the major and minor Python version, respectively\n  - **`lt`** means \"a Python version **less than (`\u003c`) `X.Y`** is required for this line or block\n    of code to be executed and included in the coverage check\"\n  - **`ge`** means \"a Python version **greater than or equal to (`\u003e=`) `X.Y`** is required\"\n- `# cover-not-Z` and `# cover-only-Z`, where:\n  - **`not`** means \"this code is **not** executed on this OS / platform / implementation\"\n  - **`only`** means \"this code is **only** executed on this OS / platform / implementation\"\n  - `Z` may be any of the following values:\n    - [`os.name`](https://docs.python.org/3/library/os.html#os.name):\n      \"posix\", \"nt\", \"java\"\n    - [`sys.platform`](https://docs.python.org/3/library/sys.html#sys.platform):\n      \"aix\", \"emscripten\", \"linux\", \"wasi\", \"win32\", \"cygwin\", \"darwin\"\n    - [`sys.implementation.name`](https://docs.python.org/3/library/sys.html#sys.implementation):\n      \"cpython\", \"ironpython\", \"jython\", \"pypy\"\n\nNote the comments are case-sensitive. Any amount of whitespace is allowed between\nthe `#` and `cover`, including no space. The comments must always be followed by\nwhitespace or end-of-line. If you put any other comments after these comments,\nfor best forward compatibility it is strongly recommended you use another `#`,\nfor example: `some_code()  # cover-only-win32  # only executed on Windows`.\n\n\nAuthor, Copyright, and License\n------------------------------\n\nCopyright (c) 2024 Hauke Dämpfling (haukex@zero-g.net)\nat the Leibniz Institute of Freshwater Ecology and Inland Fisheries (IGB),\nBerlin, Germany, \u003chttps://www.igb-berlin.de/\u003e\n\nThis library is free software: you can redistribute it and/or modify it under\nthe terms of the GNU Lesser General Public License as published by the Free\nSoftware Foundation, either version 3 of the License, or (at your option) any\nlater version.\n\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\ndetails.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with this program. If not, see \u003chttps://www.gnu.org/licenses/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaukex%2Fcoverage-simple-excludes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaukex%2Fcoverage-simple-excludes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaukex%2Fcoverage-simple-excludes/lists"}