orthoses-yard 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6417c32f741a5dfc134166c945908278cbd986d2a2004a8fa4cdede7155e63d0
4
- data.tar.gz: 45d9288f5ddfe277dd5592cc65103d3961aa195df8af80a3707f1309ee0d8344
3
+ metadata.gz: 36b54b543b79745b042a7ec072d923adaf37d46a51e61477637a6b14ec2051bc
4
+ data.tar.gz: 5f591556c56266c92d83e58f6af2f9a970734b5f5c6f2b21894d93a350bf1f55
5
5
  SHA512:
6
- metadata.gz: c929d6d2754ba40898f13213289da72cf66a4977a04626c3670a3dbb85717007f93c254654fbd50d86f0b91c1a179ed47c180496b5210b22182ad6008fb8f358
7
- data.tar.gz: e918f5642b21d48b95c3b47c774c71537481310829206a73ab6e1f4844ed4a66cec81b1243bed6734993d5cecddd46fb9a9777053fbf18cd8e416f8ca3920d1b
6
+ metadata.gz: 712dbf70f932c3d5fdea40b6844e5a78a363f51b33bf96dfec250fd0e20d3ca61c2b13ac1320c6edf1e503cbb45d601f9a3da2416731bb6a8efe64a7a5d69426
7
+ data.tar.gz: a03f7ca554c4548f99ef07eaed0213fd68ab6aa4a5cc3f0dcd5bd7ce2386a81d800efc5aa28a9af0091b30d9b5afdfbe8bf4dff309f23460a9aba0b178db53a9
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Orthoses
4
4
  class YARD
5
- VERSION = "0.4.0"
5
+ VERSION = "0.5.0"
6
6
  end
7
7
  end
@@ -269,12 +269,21 @@ module Orthoses
269
269
  )
270
270
  end
271
271
  else
272
+ name = TypeName(types_explainer_type.name)
273
+ type_params = temporary_type_params(name.to_s)
274
+ args = if 2 <= type_params.length
275
+ Orthoses.logger.warn("Cannot convert to rbs since generics mismatch. `#{name}` has #{type_params.length} generics in RBS. But YARD tag type is `#{types_explainer_type.to_s}`. Use `#{name}[#{type_params.join(', ')}]` instead.")
276
+ type_params
277
+ else
278
+ [type]
279
+ end
280
+
272
281
  ::RBS::Types::ClassInstance.new(
273
- name: TypeName(types_explainer_type.name),
274
- args: [type],
282
+ name: name,
283
+ args: args,
275
284
  location: nil
276
285
  )
277
- end
286
+ end
278
287
  when ::YARD::Tags::TypesExplainer::HashCollectionType
279
288
  ::RBS::Types::ClassInstance.new(
280
289
  name: TypeName(types_explainer_type.name),
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orthoses-yard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-19 00:00:00.000000000 Z
11
+ date: 2023-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orthoses