Finicky is a macOS application that acts as a smart default browser handler. It intercepts URL open requests from the operating system and routes them to different browsers based on user-defined rules written in JavaScript or TypeScript, or via a simpler JSON rules file. The application is built as a hybrid of Go (using a custom Go-like language with Objective-C interop) and a Svelte-based web UI embedded via WKWebView. It includes a JavaScript virtual machine (goja) to evaluate user configuration scripts, supports URL rewriting, short URL resolution, browser profile detection, and provides a graphical configuration and testing interface. The codebase is well-structured with separate packages for the config API (TypeScript, compiled to JS), the UI (Svelte), and the core macOS app (Go/Objective-C). It demonstrates strong engineering practices including caching, debouncing, and comprehensive testing.
The hyperlink library is a pure-Python implementation of immutable URLs, designed for correctness and compliance with RFC 3986 and RFC 3987. It provides two main classes: the low-level `URL` class, which requires explicit handling of encoding and decoding, and the high-level `DecodedURL` class, which automatically handles encoding and decoding for ease of use. The library supports parsing, manipulating, and unparsing URLs, including operations on query strings, path segments, and internationalized domain names (IDNA). It is designed to be a drop-in replacement for Twisted's URL type and is tested across a wide range of Python versions (2.6 to 3.9 and PyPy). The architecture centers around the `_url.py` module, which contains the core parsing logic, the `URL` and `DecodedURL` classes, and helper functions for encoding and decoding. The library also includes a compatibility module (`_socket.py`) that provides a cross-platform implementation of `inet_pton` for older Python versions, particularly on Windows. Testing is facilitated by hypothesis strategies in `hypothesis.py` for generating valid URL components. The library has minimal external dependencies, relying only on the `idna` package for IDNA support and conditionally on `typing` for older Python versions. It is well-maintained with a comprehensive test suite and continuous integration setup, though it continues to support legacy Python versions, which introduces some maintenance overhead.