From ec43b241a80bd1a1f1e0389ddd16656dfaa0dc07 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 23 Dec 2024 23:57:41 +0000 Subject: [PATCH] sorbet: Add an RBI file for `PyCall` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - This is used in `Homebrew/formula-analytics` to import Python modules, specifically the InfluxDB client we need. - Sorbet complained that it couldn‘t find the `PyCall` reference, so let’s teach Sorbet about it. --- Library/Homebrew/sorbet/rbi/pycall-setup.rbi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Library/Homebrew/sorbet/rbi/pycall-setup.rbi diff --git a/Library/Homebrew/sorbet/rbi/pycall-setup.rbi b/Library/Homebrew/sorbet/rbi/pycall-setup.rbi new file mode 100644 index 0000000000000..4251eed376369 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/pycall-setup.rbi @@ -0,0 +1,14 @@ +# typed: true # rubocop:disable Sorbet/StrictSigil + +module InfluxDBClient3; end + +# This is required for the `formula-analytics` tap's usage of `PyCall`. +module PyCall + module Import + def self.pyfrom(*args); end + + def self.import(*args); end + end + + class PyError; end # rubocop:disable Lint/EmptyClass +end