Skip to content

Commit

Permalink
[ruby/prism] Bump typechecking deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton authored and matzbot committed Dec 11, 2024
1 parent cfb7213 commit 34e6854
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/prism/parse_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ def initialize(source, encoding)
LengthCounter.new(source, encoding)
end

@cache = {}
@offsets = []
@cache = {} #: Hash[Integer, Integer]
@offsets = [] #: Array[Integer]
end

# Retrieve the code units offset from the given byte offset.
Expand Down
2 changes: 1 addition & 1 deletion lib/prism/parse_result/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(parse_result)

# Formats the errors in a human-readable way and return them as a string.
def format
error_lines = {}
error_lines = {} #: Hash[Integer, Array[ParseError]]
parse_result.errors.each do |error|
location = error.location
(location.start_line..location.end_line).each do |line|
Expand Down
2 changes: 1 addition & 1 deletion lib/prism/relocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def reify! # :nodoc:
while (node = queue.shift)
@entries[node.node_id].each do |field_name, entry|
value = node.public_send(field_name)
values = {}
values = {} #: Hash[Symbol, untyped]

fields.each_value do |field|
values.merge!(field.fields(value))
Expand Down
2 changes: 1 addition & 1 deletion prism/templates/lib/prism/node.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ module Prism
# bytes, as opposed to characters or code units.
def tunnel(line, column)
queue = [self] #: Array[Prism::node]
result = []
result = [] #: Array[Prism::node]

while (node = queue.shift)
result << node
Expand Down

0 comments on commit 34e6854

Please sign in to comment.