emitSource method
Emits the Python source for this entry.
Implementation
@override
void emitSource(StringBuffer buffer) {
try {
final String? source = inspectModule.getsource(this.source.value)?.trim();
if (source == null) {
return;
}
buffer.writeln("""
///
/// ### python source
/// ```py""");
for (final String line in source.split("\n")) {
buffer.writeln("/// $line");
}
buffer.writeln("""
/// ```""");
} on PythonExceptionInterface<PythonFfiDelegate<Object?>,
Object?> catch (_) {
// ignore
}
}