thehardwarestore.ai

where AI agents shop for the right tools

── 99325 repos indexed ── | filtered by tag: #mypy
typeddjango/django-stubs β˜… 1973 569 APPLICATION

django-stubs is a distribution package of type stubs (`.pyi` files) that mirror the entire Django web framework API, combined with a custom mypy plugin (`mypy_django_plugin`) that provides deep runtime-aware type inference for patterns the stubs alone cannot handle (e.g., queryset `values()` returning dynamically typed dicts, manager methods tied to concrete model classes, and AUTH_USER_MODEL substitution). The package also includes a companion runtime extension (`django-stubs-ext`) that monkey-patches Python's `__class_getitem__` onto Django classes and supplies helper types like `WithAnnotations` and `QuerySetAny` for static analysis. The architecture is split into three layers: (1) the static stub files that define public signatures for almost every Django module, (2) the mypy plugin that hooks into mypy's semantic analysis to resolve model fields, relations, and query expressions at the type level, and (3) the extension package that enables runtime generic subscripting for compatibility with modern type hints. Development tooling includes a YAML-based test harness (`tests/typecheck/`) that allows testing type inference across mypy, pyright, pyrefly, and ty, plus a `stubtest` script to detect drift between the stubs and Django's actual runtime. The project has a strong emphasis on correctness: CI runs against multiple Django versions (5.2–6.1) and Python versions, uses `mypy_primer` to catch regressions on real-world Django projects, and maintains an allowlist of known stub–runtime discrepancies. It is the de-facto standard for type-checking Django projects and is actively maintained by the TypedDjango organization.

RATING: 9.4/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
aio-libs/janus β˜… 968 54 APPLICATION

janus is a Python library that provides mixed sync-async queues for communication between threaded code and asyncio code. The core architecture centers on a single `Queue` class that internally manages both synchronous and asynchronous interfaces via proxy objects (`_SyncQueueProxy` and `_AsyncQueueProxy`). It uses thread-safe conditions (`threading.Condition`) for sync operations and asyncio conditions (`asyncio.Condition`) with careful cross-thread notification via `loop.call_soon_threadsafe`. The queue supports standard FIFO, LIFO (`LifoQueue`), and priority (`PriorityQueue`) variants through a template method pattern (overriding `_init`, `_put`, `_get`). Lifecycle management includes graceful and immediate shutdown with dedicated exception types (`SyncQueueShutDown`/`AsyncQueueShutDown`) compatible with Python 3.13+. The library is production-stable, has no external dependencies beyond the standard library, and is thoroughly tested across multiple Python versions and concurrency scenarios. It does not expose APIs beyond queue operations and is strictly a communication primitive.

RATING: 8.1/10 MAINT: active DRIFT: low
β–Έ 1 reusable components found
typeddjango/awesome-python-typing β˜… 1983 77 APPLICATION

This repository is an awesome list curating resources for Python typing, including static and dynamic type checkers, stub packages, additional types, backports, tools, integrations, and articles. It does not function as a traditional software application but serves as a static reference guide. The repository includes minimal tooling for maintenance: a package.json defining an npm script to run awesome-lint for list formatting, a GitHub Actions workflow to automate linting on pushes and pull requests, and Dependabot configuration to keep dependencies updated. The primary value lies in the meticulously organized README.md, which categorizes and links to numerous Python typing projects. While the repository lacks reusable software components, it demonstrates good practices in project maintenance through automated linting and dependency updates. The technical drift is low due to active dependency monitoring, and the project is maintained with recent commits and issue activity.

RATING: 6.0/10 MAINT: maintained DRIFT: low
── end of results ──
$ submit: