Address Ameba issues

This commit is contained in:
Michael Miller 2020-10-19 20:34:18 -06:00
parent a0e6d5c4e8
commit e8afe5070b
No known key found for this signature in database
GPG key ID: F9A0C5C65B162436
2 changed files with 3 additions and 2 deletions

View file

@ -38,7 +38,7 @@ module Spectator::DSL
what.is_a?(Path) ||
what.is_a?(TypeNode) ||
what.is_a?(Union)) &&
(described_type = what.resolve?).is_a?(TypeNode) %}
what.resolve?.is_a?(TypeNode) %}
{{what.symbolize}}
{% elsif what.is_a?(StringLiteral) ||
what.is_a?(StringInterpolation) ||

View file

@ -54,7 +54,8 @@ module Spectator
# Add padding between the node names
# only if the names don't appear to be symbolic.
io << ' ' unless !group.name? || # Skip blank group names (like the root group).
# Skip blank group names (like the root group).
io << ' ' unless !group.name? || # ameba:disable Style/NegatedConditionsInUnless
(group.name?.is_a?(Symbol) && name.is_a?(String) &&
(name.starts_with?('#') || name.starts_with?('.')))
end