Skip to content

Commit

Permalink
Autocorrect by RuboCop
Browse files Browse the repository at this point in the history
Applied followings

- RBS/Layout/SpaceAroundOperators
- RBS/Layout/OverloadIndentation
- RBS/Layout/SpaceBeforeOverload
- RBS/Layout/ExtraSpacing
- RBS/Layout/SpaceAroundBraces
  • Loading branch information
ksss committed Jun 18, 2024
1 parent 26e04eb commit 3fc82c9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion core/kernel.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ module Kernel : BasicObject
| (int | _ToR rational_like, exception: bool) -> Rational?
| (int | _ToR numer, ?int | _ToR denom, ?exception: true) -> Rational
| (int | _ToR numer, ?int | _ToR denom, exception: bool) -> Rational?
| [T] (Numeric&_RationalDiv[T] numer, Numeric denom, ?exception: bool) -> T
| [T] (Numeric & _RationalDiv[T] numer, Numeric denom, ?exception: bool) -> T
| [T < Numeric] (T value, 1, ?exception: bool) -> T
| (untyped, ?untyped, ?exception: bool) -> Rational?

Expand Down
14 changes: 7 additions & 7 deletions core/rbs/unnamed/env_class.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ module RBS
#
%a{annotate:rdoc:copy:ENV.fetch}
def fetch: (String name) -> String
| [X] (String name, X default) -> (String | X)
| [X] (String name) { (String) -> X } -> (String | X)
| [X] (String name, X default) -> (String | X)
| [X] (String name) { (String) -> X } -> (String | X)

# <!--
# rdoc-file=hash.c
Expand Down Expand Up @@ -382,7 +382,7 @@ module RBS
#
%a{annotate:rdoc:copy:ENV.each_pair}
def each_pair: () -> ::Enumerator[[ String, String ], self]
| () { ([ String, String ]) -> void } -> self
| () { ([ String, String ]) -> void } -> self

# <!--
# rdoc-file=hash.c
Expand Down Expand Up @@ -479,7 +479,7 @@ module RBS
#
%a{annotate:rdoc:copy:ENV.delete_if}
def delete_if: () -> ::Enumerator[[ String, String ], self]
| () { (String name, String value) -> boolish } -> self
| () { (String name, String value) -> boolish } -> self

# <!--
# rdoc-file=hash.c
Expand All @@ -501,7 +501,7 @@ module RBS
#
%a{annotate:rdoc:copy:ENV.keep_if}
def keep_if: () -> ::Enumerator[[ String, String ], self]
| () { (String name, String value) -> boolish } -> self
| () { (String name, String value) -> boolish } -> self

# <!--
# rdoc-file=hash.c
Expand Down Expand Up @@ -588,7 +588,7 @@ module RBS
#
%a{annotate:rdoc:copy:ENV.reject!}
def reject!: () -> ::Enumerator[[ String, String ], self?]
| () { (String name, String value) -> boolish } -> self?
| () { (String name, String value) -> boolish } -> self?

# <!--
# rdoc-file=hash.c
Expand Down Expand Up @@ -674,7 +674,7 @@ module RBS
#
%a{annotate:rdoc:copy:ENV.select!}
def select!: () -> ::Enumerator[[ String, String ], self?]
| () { (String name, String value) -> boolish } -> self?
| () { (String name, String value) -> boolish } -> self?

# <!--
# rdoc-file=hash.c
Expand Down
12 changes: 6 additions & 6 deletions core/rbs/unnamed/random.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ module RBS
#
%a{annotate:rdoc:copy:Random::Formatter#random_number}
def random_number: () -> Float
| (?Float? n) -> Float
| (?Integer? n) -> Integer
| (?Numeric? n) -> Numeric
| (?::Range[Float]? n) -> Float
| (?::Range[Integer]? n) -> Integer
| (?::Range[Numeric]? n) -> Numeric
| (?Float? n) -> Float
| (?Integer? n) -> Integer
| (?Numeric? n) -> Numeric
| (?::Range[Float]? n) -> Float
| (?::Range[Integer]? n) -> Integer
| (?::Range[Numeric]? n) -> Numeric

# <!--
# rdoc-file=lib/random/formatter.rb
Expand Down
2 changes: 1 addition & 1 deletion core/trace_point.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ class TracePoint < Object
# trace.enable { p tp.lineno }
# #=> RuntimeError: access from outside
#
def enable: (?target: (Method | UnboundMethod | Proc)?, ?target_line: Integer?, ?target_thread: Thread?) -> bool
def enable: (?target: (Method | UnboundMethod | Proc)?, ?target_line: Integer?, ?target_thread: Thread?) -> bool
| [R] (?target: (Method | UnboundMethod | Proc)?, ?target_line: Integer?, ?target_thread: Thread?) { () -> R } -> R

# <!--
Expand Down
2 changes: 1 addition & 1 deletion stdlib/zlib/0/deflate.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ module Zlib
# SYNC_FLUSH, FULL_FLUSH and FINISH.
#
def flush: (?Integer flush) -> String
| (?Integer flush) {(String chunk) -> nil } -> nil
| (?Integer flush) { (String chunk) -> nil } -> nil

# <!--
# rdoc-file=ext/zlib/zlib.c
Expand Down

0 comments on commit 3fc82c9

Please sign in to comment.