Skip to content

Commit

Permalink
🏷️ update types
Browse files Browse the repository at this point in the history
  • Loading branch information
YutaGoto committed Feb 1, 2024
1 parent 6d899ac commit b43930d
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 45 deletions.
7 changes: 7 additions & 0 deletions Steepfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# frozen_string_literal: true

D = Steep::Diagnostic

target :lib do
signature 'sig'

check 'lib'
repo_path '.gem_rbs_collection'

configure_code_diagnostics do |hash|
hash[D::Ruby::MethodDefinitionMissing] = :warning
hash[D::Ruby::UnknownConstant] = :information
end
end
109 changes: 74 additions & 35 deletions rbs_collection.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
sources:
- name: ruby/gem_rbs_collection
remote: https://github.com/ruby/gem_rbs_collection.git
revision: main
repo_dir: gems
path: ".gem_rbs_collection"
gems:
- name: activesupport
Expand All @@ -22,6 +17,14 @@ gems:
revision: c42c09528dd99252db98f0744181a6de54ec2f55
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: base64
version: '0'
source:
type: stdlib
- name: bigdecimal
version: '0'
source:
type: stdlib
- name: concurrent-ruby
version: '1.1'
source:
Expand All @@ -30,7 +33,15 @@ gems:
revision: c42c09528dd99252db98f0744181a6de54ec2f55
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: csv
- name: connection_pool
version: '2.4'
source:
type: git
name: ruby/gem_rbs_collection
revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: date
version: '0'
source:
type: stdlib
Expand All @@ -46,6 +57,10 @@ gems:
version: '0'
source:
type: stdlib
- name: forwardable
version: '0'
source:
type: stdlib
- name: i18n
version: '1.10'
source:
Expand All @@ -58,14 +73,6 @@ gems:
version: '0'
source:
type: stdlib
- name: listen
version: '3.2'
source:
type: git
name: ruby/gem_rbs_collection
revision: c42c09528dd99252db98f0744181a6de54ec2f55
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: logger
version: '0'
source:
Expand All @@ -74,6 +81,22 @@ gems:
version: '0'
source:
type: stdlib
- name: monitor
version: '0'
source:
type: stdlib
- name: mutex_m
version: '0'
source:
type: stdlib
- name: net-http
version: '0'
source:
type: stdlib
- name: net-protocol
version: '0'
source:
type: stdlib
- name: parallel
version: '1.20'
source:
Expand All @@ -82,6 +105,14 @@ gems:
revision: c42c09528dd99252db98f0744181a6de54ec2f55
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: parser
version: '3.2'
source:
type: git
name: ruby/gem_rbs_collection
revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: rainbow
version: '3.0'
source:
Expand All @@ -90,30 +121,38 @@ gems:
revision: c42c09528dd99252db98f0744181a6de54ec2f55
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: securerandom
version: '0'
- name: rake
version: '13.0'
source:
type: stdlib
- name: steep
version: 1.3.0
source:
type: rubygems
- name: strscan
version: '0'
source:
type: stdlib
- name: date
version: '0'
type: git
name: ruby/gem_rbs_collection
revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: regexp_parser
version: '2.8'
source:
type: stdlib
- name: monitor
version: '0'
type: git
name: ruby/gem_rbs_collection
revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: rubocop
version: '1.57'
source:
type: stdlib
- name: mutex_m
version: '0'
type: git
name: ruby/gem_rbs_collection
revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: rubocop-ast
version: '1.30'
source:
type: stdlib
type: git
name: ruby/gem_rbs_collection
revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: singleton
version: '0'
source:
Expand All @@ -122,7 +161,7 @@ gems:
version: '0'
source:
type: stdlib
- name: forwardable
- name: timeout
version: '0'
source:
type: stdlib
Expand Down
2 changes: 2 additions & 0 deletions rbs_collection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ gems:
# It's unnecessary if you don't use rbs as a library.
- name: rbs
ignore: true
- name: steep
ignore: true
2 changes: 1 addition & 1 deletion sig/ika3/concerns/utils.rbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Ika3
module Concerns
module Utils
def self?.load_yaml_file: (file: String) -> Object
def self?.load_yaml_file: (String) -> Object
end
end
end
6 changes: 3 additions & 3 deletions sig/ika3/schedule.rbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
class Hash[unchecked out K, unchecked out V] < Object
def method_missing: (name: String) -> untyped
def method_missing: (Symbol) -> untyped
end

module Ika3
class Schedule
def initialize: (contact: String) -> void
def initialize: (String) -> void

private

def send_request: (method: String, path: String) -> Object
def send_request: (Symbol, String) -> Object

def api_url: () -> "https://spla3.yuu26.com/"

Expand Down
12 changes: 6 additions & 6 deletions sig/ika3/weapon.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ module Ika3

include Ika3::Concerns::Utils

def self.find: (untyped weapon_key) -> untyped
def self.find: (String) -> (Exception | Object)

def self.find_by_name: (untyped weapon_name) -> untyped
def self.find_by_name: (String) -> (Exception | Object)

def self.filter_by_sub: (untyped sub_name) -> untyped
def self.filter_by_sub: (String) -> (Exception | Object)

def self.reload_config!: () -> untyped
def self.reload_config!: () -> void

private

def self.names: () -> Array[Symbol]

def self.weapons: () -> Array[Object]
def self.weapons: () -> Hash[Symbol, String]

def self.sub_weapons: () -> Array[Object]
def self.sub_weapons: () -> Hash[Symbol, String]

def self.config: () -> untyped

Expand Down

0 comments on commit b43930d

Please sign in to comment.