Skip to content

Commit 3caa847

Browse files
authored
Merge branch 'master' into hayat01sh1da/python/introduce-mypy-typechecking
2 parents bc4ae33 + 890ff9d commit 3caa847

5 files changed

Lines changed: 129 additions & 4 deletions

File tree

.github/workflows/ruby.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,4 @@ jobs:
117117
- name: Steep
118118
working-directory: ./ruby
119119
run: |
120-
bundle exec rbs-inline --output sig/generated/ .
121120
bundle exec steep check

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
# Ruby
2-
ruby/sig/
3-
41
# Python
52
python/**/__pycache__/

ruby/sig/generated/main.rbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Generated from main.rb with RBS::Inline
2+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Generated from src/application.rb with RBS::Inline
2+
3+
class Application
4+
class ValueError < StandardError
5+
end
6+
7+
class DigitLengthError < StandardError
8+
end
9+
10+
USERNAMES: untyped
11+
12+
# @rbs username: String
13+
# @rbs unit: String
14+
# @rbs year: String
15+
# @rbs return: void
16+
def self.run: (?username: String, ?unit: String, ?year: String) -> void
17+
18+
# @rbs username: String
19+
# @rbs unit: String
20+
# @rbs year: String
21+
# @rbs return: void
22+
def initialize: (?username: String, ?unit: String, ?year: String) -> void
23+
24+
# @rbs return: void
25+
def validate_username!: () -> void
26+
27+
# @rbs return: String
28+
def validate_unit!: () -> String
29+
30+
# @rbs return: String
31+
def validate_year!: () -> String
32+
33+
# @rbs return: void
34+
def run: () -> void
35+
36+
private
37+
38+
attr_reader username: untyped
39+
40+
attr_reader unit: untyped
41+
42+
attr_reader year: untyped
43+
44+
# @rbs return: String
45+
def full_unit: () -> String
46+
47+
# @rbs month: Integer
48+
# @rbs day: Integer
49+
# @rbs return: bool
50+
def is_monday?: (Integer month, Integer day) -> bool
51+
52+
# @rbs month: Integer
53+
# @rbs day: Integer
54+
# @rbs return: bool
55+
def is_saturday?: (Integer month, Integer day) -> bool
56+
57+
# @rbs month: Integer
58+
# @rbs day: Integer
59+
# @rbs return: bool
60+
def is_sunday?: (Integer month, Integer day) -> bool
61+
62+
# @rbs month: Integer
63+
# @rbs day: Integer
64+
# @rbs return: bool
65+
def is_weekend?: (Integer month, Integer day) -> bool
66+
67+
# @rbs return: bool
68+
def is_leap_year?: () -> bool
69+
70+
# @rbs array: Array[untyped]
71+
# @rbs date: String
72+
# @rbs return: String
73+
def body: (String date, ?Array[untyped] array) -> String
74+
75+
# @rbs directory: String
76+
# @rbs index: String
77+
# @rbs day: String
78+
# @rbs month: String
79+
# @rbs array: Array[untyped]
80+
# @rbs return: void
81+
def export_template: (?directory: String, ?index: String, ?day: String, ?month: String, ?array: Array[untyped]) -> void
82+
83+
# @rbs month: String
84+
# @rbs return: void
85+
def create_templates: (String month) ?{ (?) -> untyped } -> void
86+
end
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Generated from test/application_test.rb with RBS::Inline
2+
3+
class ApplicationTest < Minitest::Test
4+
def setup: () -> untyped
5+
6+
def teardown: () -> untyped
7+
8+
private
9+
10+
attr_reader username: untyped
11+
12+
attr_reader year: untyped
13+
14+
attr_reader base_dir: untyped
15+
16+
attr_reader template_files: untyped
17+
18+
def check_template_files: (untyped unit) -> untyped
19+
20+
def no_template?: () -> untyped
21+
end
22+
23+
class RegularCaseTest < ApplicationTest
24+
def test_run_by_daily_unit: () -> untyped
25+
26+
def test_run_by_weekly_unit: () -> untyped
27+
28+
def test_run_by_monthly_unit: () -> untyped
29+
end
30+
31+
class IrregularCaseTest < ApplicationTest
32+
def test_initialize_with_invalid_username: () -> untyped
33+
34+
def test_initialize_with_invalid_unit: () -> untyped
35+
36+
def test_initialize_with_non_digit_argument: () -> untyped
37+
38+
def test_initialize_with_invalid_value_as_year: () -> untyped
39+
40+
def test_initialize_with_older_year: () -> untyped
41+
end

0 commit comments

Comments
 (0)