Best effort attempt to generate a template from which a __text_signature__ can be created.
(sig: &Signature, name: &str)
| 724 | // Best effort attempt to generate a template from which a |
| 725 | // __text_signature__ can be created. |
| 726 | pub(crate) fn text_signature(sig: &Signature, name: &str) -> String { |
| 727 | let signature = func_sig(sig); |
| 728 | if signature.starts_with("$self") { |
| 729 | format!("{name}({signature})") |
| 730 | } else { |
| 731 | format!("{}({}, {})", name, "$module", signature) |
| 732 | } |
| 733 | } |
| 734 | |
| 735 | pub(crate) fn infer_native_call_flags(sig: &Signature, drop_first_typed: usize) -> TokenStream { |
| 736 | // Best-effort mapping of Rust function signatures to CPython-style |
no test coverage detected