From c41dbb18702b19f50f7b9da9be4edaba009a503a 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.rbi | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Library/Homebrew/sorbet/rbi/pycall.rbi diff --git a/Library/Homebrew/sorbet/rbi/pycall.rbi b/Library/Homebrew/sorbet/rbi/pycall.rbi new file mode 100644 index 0000000000000..bb12a3573f6f3 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/pycall.rbi @@ -0,0 +1,12 @@ +# typed: true + +# 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 +end