Skip to content

Commit

Permalink
Merge pull request #1506 from tk0miya/fix_typo
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
soutaro authored Feb 28, 2025
2 parents 425a9f0 + 944af85 commit cc79f7a
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lib/steep/type_construction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2956,7 +2956,7 @@ def synthesize_constant_decl(node, parent_node, constant_name, &block)
nil
]
else
# No neesting
# No nesting
synthesize_constant(node, nil, constant_name, &block)
end
end
Expand Down Expand Up @@ -4453,7 +4453,7 @@ def for_block(body_node, block_params:, block_param_hint:, block_type_hint:, blo

param_types = param_types_hash.each.with_object({}) do |pair, hash| #$ Hash[Symbol, [AST::Types::t, AST::Types::t?]]
name, type = pair
# skip unamed arguments `*`, `**` and `&`
# skip unnamed arguments `*`, `**` and `&`
next if name.nil?
hash[name] = [type, nil]
end
Expand Down
2 changes: 1 addition & 1 deletion sig/steep/interface/builder.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module Steep
# Returns a shape of given type with respect to Config
#
# * If `self` occurs in the given type, it returns types with `self`
# * If `self` doesn't occur in the given type, it returns type withohut `self`, that is resolved to `config.self_type`
# * If `self` doesn't occur in the given type, it returns type without `self`, that is resolved to `config.self_type`
#
def shape: (AST::Types::t, Config) -> Shape?

Expand Down
6 changes: 3 additions & 3 deletions sig/steep/interface/method_type.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module Steep
# It works when:
#
# * `type1` and `type2` are equal modulo type parameters (`[A] () -> A` | `[B] () -> B` → `[A] () -> A`), or
# * The type parameter occurences are identical (`[A] (::Integer) -> A` | `[B] (::String) -> B` → `[A] (::Integer & ::String) -> A`)
# * The type parameter occurrences are identical (`[A] (::Integer) -> A` | `[B] (::String) -> B` → `[A] (::Integer & ::String) -> A`)
#
# Otherwise it fails (returns `nil`).
#
Expand All @@ -69,7 +69,7 @@ module Steep
# It works when:
#
# * `type1` and `type2` are equal modulo type parameters (`[A] () -> A` & `[B] () -> B` → `[A] () -> A`), or
# * The type parameter occurences are identical (`[A] (::Integer) -> A` & `[B] (::String) -> B` → `[A] (::Integer | ::String) -> A`)
# * The type parameter occurrences are identical (`[A] (::Integer) -> A` & `[B] (::String) -> B` → `[A] (::Integer | ::String) -> A`)
#
# Otherwise it fails (returns `nil`).
#
Expand Down Expand Up @@ -100,7 +100,7 @@ module Steep
def &: (MethodType other) -> MethodType?

# Returns true if the method accepts one argument, no keyword arguments, and no block
#
#
def accept_one_arg?: () -> bool
end
end
Expand Down
2 changes: 1 addition & 1 deletion sig/steep/server/custom_methods.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module Steep
def self.notification: (params) -> untyped
end

# Notification with parames of a file name and its contents, sent from master to workers
# Notification with params of a file name and its contents, sent from master to workers
#
module FileReset
METHOD: String
Expand Down
2 changes: 1 addition & 1 deletion sig/steep/server/lsp_formatter.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Steep
# * `markup_content` translates a string to `MarkupContent` object
# * `format_hover_content` translates a hover content to Markdown string
# * `format_completion_docs` translates a completion item to a documentation
# * `format_rbs_competion_docs` generates docs for completion item of RBS
# * `format_rbs_completion_docs` generates docs for completion item of RBS
#
module LSPFormatter
include Services
Expand Down
2 changes: 1 addition & 1 deletion sig/steep/server/target_group_files.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module Steep
# Add path
#
# * Returns `true` if the path is under the control of the project.
# * Returns `false` if the path doesn't blong to the project.
# * Returns `false` if the path doesn't belong to the project.
#
def add_path: (Pathname path) -> bool

Expand Down
4 changes: 2 additions & 2 deletions sig/steep/services/completion_provider.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ module Steep

attr_reader range: Range

attr_reader reeiver_type: AST::Types::t
attr_reader receiver_type: AST::Types::t

attr_reader method_types: Array[RBS::MethodType]

Expand Down Expand Up @@ -150,7 +150,7 @@ module Steep

attr_reader range: Range

attr_reader reeiver_type: AST::Types::t
attr_reader receiver_type: AST::Types::t

attr_reader method_types: Array[RBS::MethodType]

Expand Down
2 changes: 1 addition & 1 deletion sig/steep/services/signature_service.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Steep
# 1. RBS files loaded from `EnvironmentLoader` -- usually type signatures of libraries
# 2. RBS files managed in editors -- usually type signatures of the development target (app or gem)
#
# The files in #2 are managed throuth `#status` and the changes are tracked.
# The files in #2 are managed through `#status` and the changes are tracked.
#
class SignatureService
type status = SyntaxErrorStatus | AncestorErrorStatus | LoadedStatus
Expand Down
2 changes: 1 addition & 1 deletion sig/steep/services/type_check_service.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module Steep

def update_content: (String content) -> SourceFile

# Diagnostics filgered by `ignores`
# Diagnostics filtered by `ignores`
#
def diagnostics: () -> Array[Diagnostic::Ruby::Base]
end
Expand Down
2 changes: 1 addition & 1 deletion sig/steep/services/type_name_completion.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module Steep
# Yield type names defined in the environment
#
# * Yields an absolute type name if it is defined in the environment
# * Yields an relative type name if it is imported with `use` declerative
# * Yields an relative type name if it is imported with `use` declarative
#
# Alias classes/modules and types under them are yielded.
#
Expand Down
2 changes: 1 addition & 1 deletion sig/steep/subtyping/check.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ module Steep

def check_method_params: (Symbol name, Relation[Interface::Function::Params] relation) -> Result::t

# Returns `nil` when given two method_types are structually comparable.
# Returns `nil` when given two method_types are structurally comparable.
# Returns a failure otherwise.
#
def match_method_type_fails?: (Symbol name, Interface::MethodType method_type1, Interface::MethodType method_type2) -> (nil | Result::t)
Expand Down
6 changes: 3 additions & 3 deletions sig/steep/type_construction.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ module Steep
#
# * `send_node` can be `:send`, `:super`, or `:zsuper`
# * `node` can be `:send`, `:block`, `:super`, or `:zsuper`
# * Specify `unwrap` keyword `true` to type check safe-navigation-operator, that unwraps the type of reeiver automatically and make the return type optional
# * Specify `unwrap` keyword `true` to type check safe-navigation-operator, that unwraps the type of receiver automatically and make the return type optional
#
def type_send: (
Parser::AST::Node node,
Expand Down Expand Up @@ -212,11 +212,11 @@ module Steep
hint: Types::t?
) -> Pair

# The third step to type check method calls, which tries all of the overlods defined for the method
# The third step to type check method calls, which tries all of the overloads defined for the method
#
# * It receives the `Shape::Entry` object that represents an method entry of a shape
# * Returns `nil` when it cannot find suitable one from more than one overloads
# * It means the type checker can report only *no suitable overlod detected for this args* 😫
# * It means the type checker can report only *no suitable overload detected for this args* 😫
#
def type_method_call: (
Parser::AST::Node node,
Expand Down
4 changes: 2 additions & 2 deletions sig/steep/type_inference/case_when.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ module Steep

# The result for body of the when-clause
#
# Raises an error when no patern is registered.
# Raises an error when no pattern is registered.
#
def body_result: () { (TypeEnv) -> TypeEnv? } -> [TypeConstruction, bool]

# The result for next when-clause
#
# Raises an error when no patern is registered.
# Raises an error when no pattern is registered.
#
def falsy_result: () -> [TypeConstruction, bool]

Expand Down
2 changes: 1 addition & 1 deletion sig/steep/type_inference/logic_type_interpreter.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module Steep
#
# This is done by top-down manner.
#
# Assignes given two types to the node when:
# Assigns given two types to the node when:
#
# * `node` is a `lvar`
# * `node` is a `lvasgn`
Expand Down
2 changes: 1 addition & 1 deletion sig/steep/type_inference/method_params.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Steep
module TypeInference
# A MethodParams object provides the information of parameters from MethodType and nodes
#
# It primarly provides a mapping from a local variable (method parameter) to its type.
# It primarily provides a mapping from a local variable (method parameter) to its type.
#
class MethodParams
class BaseParameter
Expand Down

0 comments on commit cc79f7a

Please sign in to comment.