{"id":20727554,"url":"https://github.com/flying-sheep/hatch-scanpy-typeshed","last_synced_at":"2026-04-21T15:03:38.843Z","repository":{"id":208459818,"uuid":"721679149","full_name":"flying-sheep/hatch-scanpy-typeshed","owner":"flying-sheep","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-10T19:01:44.000Z","size":95,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-10T20:22:01.991Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flying-sheep.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-11-21T14:53:43.000Z","updated_at":"2025-03-10T19:01:46.000Z","dependencies_parsed_at":"2024-02-06T10:27:37.045Z","dependency_job_id":"a4562c5c-9e42-4ac5-a8d8-1550c2d118a7","html_url":"https://github.com/flying-sheep/hatch-scanpy-typeshed","commit_stats":null,"previous_names":["flying-sheep/hatch-scanpy-typeshed"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-sheep%2Fhatch-scanpy-typeshed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-sheep%2Fhatch-scanpy-typeshed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-sheep%2Fhatch-scanpy-typeshed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-sheep%2Fhatch-scanpy-typeshed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flying-sheep","download_url":"https://codeload.github.com/flying-sheep/hatch-scanpy-typeshed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243005033,"owners_count":20220408,"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":[],"created_at":"2024-11-17T04:32:19.731Z","updated_at":"2026-04-21T15:03:38.794Z","avatar_url":"https://github.com/flying-sheep.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"hatch-scanpy-typeshed\n=====================\n\n|PyPI Version| |PyPI Python Version| |Coverage|\n\nWhat does it do?\n----------------\n\nFor functions using keyword-only arguments (``*, copy: ...``),\nit is able to clear up the function signature for ``copy``,\ntelling type checkers that a function returns ``None`` precisely when ``copy=False``,\nand otherwise an ``AnnData`` instance.\n\nE.g. when run on scanpy’s ``tl._score_genes`` module, it creates a ``.pyi`` file like this:\n\n.. code:: python\n\n   from collections.abc import Sequence\n   from typing import Literal, overload\n   from anndata import AnnData\n   from .._utils import AnyRandom\n\n   def score_genes(\n       adata: AnnData, gene_list: Sequence[str], ctrl_size: int = ..., gene_pool: Sequence[str] | None = ...,\n       n_bins: int = ..., score_name: str = ..., random_state: AnyRandom = ..., copy: bool = ..., use_raw: bool | None = ...,\n   ) -\u003e AnnData | None: ...\n   @overload\n   def score_genes_cell_cycle(adata: AnnData, s_genes: Sequence[str], g2m_genes: Sequence[str], copy: Literal[True], **kwargs) -\u003e AnnData: ...\n   @overload\n   def score_genes_cell_cycle(adata: AnnData, s_genes: Sequence[str], g2m_genes: Sequence[str], copy: Literal[False] = False, **kwargs) -\u003e None: ...\n\nTogether with (at the time of writing) a warning about a function that has not been converted to kw-only arguments yet:\n\n.. code:: pytb\n\n   UserWarning: Parameter 'copy' must be a keyword-only argument in scanpy.tools._score_genes function score_genes\n\nUsage\n-----\n\nThe plan is to soon include it as a plugin to a scanpy-like API’s ``pyproject.toml``:\n\n.. code:: toml\n\n   [build-system]\n   requires = [\"hatchling\", \"hatch-scanpy-typeshed\"]\n   build-backend = \"hatchling.build\"\n\nLicense\n-------\n\n``hatch-scanpy-typeshed`` is distributed under the terms of the `GPL 3 (or later)`_ license.\n\n\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/hatch-scanpy-typeshed.svg\n   :target: https://pypi.org/project/hatch-scanpy-typeshed\n.. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/hatch-scanpy-typeshed.svg\n   :target: https://pypi.org/project/hatch-scanpy-typeshed\n.. |Coverage| image:: https://codecov.io/github/flying-sheep/hatch-scanpy-typeshed/branch/main/graph/badge.svg?token=FZCw1cXSTL\n   :target: https://codecov.io/github/flying-sheep/hatch-scanpy-typeshed\n\n.. _GPL 3 (or later): https://spdx.org/licenses/GPL-3.0-or-later.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflying-sheep%2Fhatch-scanpy-typeshed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflying-sheep%2Fhatch-scanpy-typeshed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflying-sheep%2Fhatch-scanpy-typeshed/lists"}