8000 Added: Support partially overwrite keys in nested dict by cksac · Pull Request #1692 · cookiecutter/cookiecutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added: Support partially overwrite keys in nested dict #1692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2022

Conversation

cksac
Copy link
Contributor
@cksac cksac commented Jun 6, 2022

cookiecutter.json

{
    "full_name": "Raphael Pierzina",
    "github_username": "hackebrot",
    "project": {
        "name": "Kivy Project",
        "description": "Kivy Project description",
    }
}

user_config.yaml

default_context:
  project:
    name: "My Project"

Current generated context:

{
    "full_name": "Raphael Pierzina",
    "github_username": "hackebrot",
    "project": {
        "name": "My Project",
    }
}

the whole project is replace by user config instead of replace project.name only.

Expected generated context:

{
    "full_name": "Raphael Pierzina",
    "github_username": "hackebrot",
    "project": {
        "name": "My Project",
        "description": "Kivy Project description",
    }
}

@insspb insspb added bug This issue/PR relates to a bug. enhancement This issue/PR relates to a feature request. labels Jun 6, 2022
@insspb insspb changed the title support partially overwrite keys in nested dict Added: Support partially overwrite keys in nested dict Jun 6, 2022
@insspb insspb merged commit 508ef46 into cookiecutter:master Jun 6, 2022
@insspb
Copy link
Member
insspb commented Jun 6, 2022

@cksac thank you for contribution. merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR relates to a feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0