lib/spoom/sorbet/sigils.rb in spoom-1.1.1 vs lib/spoom/sorbet/sigils.rb in spoom-1.1.2
- old
+ new
@@ -53,10 +53,10 @@
# returns a string containing the strictness of a sigil in a file at the passed path
# * returns nil if no sigil
sig { params(path: T.any(String, Pathname)).returns(T.nilable(String)) }
def self.file_strictness(path)
- return nil unless File.exist?(path)
+ return nil unless File.file?(path)
content = File.read(path, encoding: Encoding::ASCII_8BIT)
strictness_in_content(content)
end
# changes the sigil in the file at the passed path to the specified new strictness