codingfix-param-use
Fix function call sites to pass positional args by position and assign constants to intermediate variables
来源信息
- 仓库
- causify-ai/helpers
- 最近来源活动
- 2026年2月28日 18:01
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 150
- Forks
- 165
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- coding.fix_param_use
- description
- Fix function call sites to pass positional args by position and assign constants to intermediate variables
- I will pass you a file
- In that file, make sure that:
- Callers pass the parameters by position and pass the keywords arguments
- Constant should be assigned to intermediate variable with the same name
corresponding to the formal parameters
- For a function with the signature
```python
def apply_llm_prompt_to_df(
prompt: str,
df: pd.DataFrame,
extractor: Callable[[Union[str, pd.Series]], str],
target_col: str,
batch_mode: str,
*,
model: str,
batch_size: int = 50,
dump_every_batch: Optional[str] = None,
tag: str = "Processing",
testing_functor: Optional[Callable[[str], str]] = None,
use_sys_stderr: bool = False,
) -> Tuple[pd.DataFrame, Dict[str, int]]:
```
- Bad
```python
df, stats = hllmcli.apply_llm_prompt_to_df(
prompt=prompt,
df=df,
extractor=extract_person_industry_from_df,
target_col="industry",
batch_mode=batch_mode,
batch_size=batch_size,
model=model,
tag=tag,
)
```
- Good
```python
target_col = "industry"
df, stats = hllmcli.apply_llm_prompt_to_df(
prompt,
df,
extract_person_industry_from_df,
target_col,
batch_mode,
batch_size=batch_size,
model=model,
tag=tag,
)
```
在 GitHub 查看