invokeのタスク(task.py
)をVSCodeでデバッグしたかったのでやりかたの備忘録
参考: https://zenn.dev/shun_kashiwa/articles/debug-python-cli-with-debugpy-vscode
- VSCodeでPython Debugger拡張入れておく
invokeのタスク(task.py
)をVSCodeでデバッグしたかったのでやりかたの備忘録
参考: https://zenn.dev/shun_kashiwa/articles/debug-python-cli-with-debugpy-vscode
from dataclasses import Field, dataclass, field, fields | |
from typing_extensions import dataclass_transform | |
class FieldDescriptor: | |
def __init__(self, field: Field): | |
self.field = field | |
def __get__(self, instance, owner): |
This Python script, replace_function_code.py
, is designed to replace a placeholder in a YAML file with the content of a Python file.
The script requires three positional arguments:
yaml_file
: This is the YAML file to be processed.python_file
: The Python file whose content will be inserted into the YAML file.placeholder
: The string in the YAML file to be replaced.The script also accepts two optional arguments:
-o
or --output
: This allows you to specify the name of the output file. If not provided, the default output file name is "output.yaml".-w
or --overwrite
: If this option is set, the original YAML file will be overwritten with the processed content.[ | |
{"prj_name": "system-design-primer", "repo_name": "donnemartin/system-design-primer", "file_names": [".gitattributes", ".gitignore", "CONTRIBUTING.md", "LICENSE.txt", "README-ja.md", "README-zh-Hans.md", "README-zh-TW.md", "README.md", "TRANSLATIONS.md", "epub-metadata.yaml", "generate-epub.sh"]}, | |
{"prj_name": "poetry", "repo_name": "python-poetry/poetry", "file_names": [".cirrus.yml", ".coveragerc", ".flake8", ".gitignore", ".pre-commit-config.yaml", "CHANGELOG.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", "Makefile", "README.md", "get-poetry.py", "make-nix-release.sh", "mypy.ini", "poetry.lock", "pyproject.toml", "sonnet", "tox.ini"]}, | |
{"prj_name": "rich", "repo_name": "willmcgugan/rich", "file_names": [".coveragerc", ".gitignore", ".readthedocs.yml", "CHANGELOG.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "CONTRIBUTORS.md", "LICENSE", "Makefile", "README.cn.md", "README.md", "make.bat", "poetry.lock", "pull_request_template.md", "pyproject.toml", "requirements-dev.txt", "setup.py"]}, | |
{"prj_na |