Small issues with Swift prompt signatures
PootieT opened this issue · 3 comments
PootieT commented
Issue 1
The indentation for extension is funky here
def add_protocol_conformance(self, t: str, p: str, body: str):
conf_str: str = f"""
extension {t}: {p} {body}
"""
self.protocol_conformances.add(conf_str)
Instead, this should fix it:
def add_protocol_conformance(self, t: str, p: str, body: str):
conf_str: str = f"""
extension {t}: {p} {body}
"""
self.protocol_conformances.add(conf_str)
the resulting extension and function will be nicely aligned afterwards at the base indentation level.
issue2
Not sure if this was intentional but there are certainly other default libraries imported for other languages, so maybe this is needed in the prompt:
import Swift
import Foundation
There are quite a few functions that uses pow
, ceil
, round
, floor
, or sqrt
and they can all be found in the libraries above.
PootieT commented
will do EOD