Skip to content

Commit

Permalink
sorbet: Add an RBI file for PyCall
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
issyl0 committed Dec 28, 2024
1 parent 4ecf9b5 commit ec43b24
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Library/Homebrew/sorbet/rbi/pycall-setup.rbi
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ec43b24

Please sign in to comment.