module Spoom::Sorbet::Sigils

def change_sigil_in_file(path, new_strictness)

: ((String | Pathname) path, String new_strictness) -> bool
changes the sigil in the file at the passed path to the specified new strictness
def change_sigil_in_file(path, new_strictness)
  content = File.read(path, encoding: Encoding::ASCII_8BIT)
  new_content = update_sigil(content, new_strictness)
  File.write(path, new_content, encoding: Encoding::ASCII_8BIT)
  strictness_in_content(new_content) == new_strictness
end