-
Notifications
You must be signed in to change notification settings - Fork 93
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
Allow passing in a custom lexer #70
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I want to use pygments lexers when asking i.e. for YAML or JSON input. If doing it right now, I get this error: ``` Traceback (most recent call last): File "/var/home/yajo/prodevel/copier/.venv/bin/copier", line 5, in <module> CopierApp.run() File "/var/home/yajo/prodevel/copier/.venv/lib/python3.8/site-packages/plumbum/cli/application.py", line 577, in run inst, retcode = subapp.run(argv, exit=False) File "/var/home/yajo/prodevel/copier/.venv/lib/python3.8/site-packages/plumbum/cli/application.py", line 572, in run retcode = inst.main(*tailargs) File "/var/home/yajo/prodevel/copier/copier/cli.py", line 38, in _wrapper return method(*args, **kwargs) File "/var/home/yajo/prodevel/copier/copier/cli.py", line 262, in main self.parent._copy( File "/var/home/yajo/prodevel/copier/copier/cli.py", line 173, in _copy return copy( File "/var/home/yajo/prodevel/copier/copier/main.py", line 135, in copy conf = make_config(**locals()) File "/var/home/yajo/prodevel/copier/copier/config/factory.py", line 141, in make_config init_args["data_from_asking_user"] = query_user_data( File "/var/home/yajo/prodevel/copier/copier/config/user_data.py", line 497, in query_user_data return questionary.get_answers() File "/var/home/yajo/prodevel/copier/copier/config/user_data.py", line 360, in get_answers self.answers_user = prompt( File "/var/home/yajo/prodevel/copier/.venv/lib/python3.8/site-packages/questionary/prompt.py", line 95, in prompt question = create_question_func(**_kwargs) File "/var/home/yajo/prodevel/copier/.venv/lib/python3.8/site-packages/questionary/prompts/text.py", line 75, in text p = PromptSession( TypeError: type object got multiple values for keyword argument 'lexer' ``` This should fix it.
yajo
force-pushed
the
text-custom-lexer
branch
from
October 5, 2020 16:11
bfc77f9
to
4c54853
Compare
6 tasks
Please could you merge this? It's blocking a release: https://github.com/copier-org/copier/runs/1241180809?check_suite_focus=true |
yajo
pushed a commit
to copier-org/copier
that referenced
this pull request
Oct 13, 2020
When tmbo/questionary#70 gets fixed, this commit should be rolled back. For now, I have to remove this support because [otherwise I cannot publish Copier to Pypi](https://github.com/copier-org/copier/runs/1241180809?check_suite_focus=true).
yajo
pushed a commit
to copier-org/copier
that referenced
this pull request
Oct 13, 2020
When tmbo/questionary#70 gets fixed, this commit should be rolled back. For now, I have to remove this support because [otherwise I cannot publish Copier to Pypi](https://github.com/copier-org/copier/runs/1241180809?check_suite_focus=true).
Looks fine to me. Waiting for @tmbo to review. |
github-actions bot
pushed a commit
to copier-org/copier
that referenced
this pull request
Oct 14, 2020
When tmbo/questionary#70 gets fixed, this commit should be rolled back. For now, I have to remove this support because [otherwise I cannot publish Copier to Pypi](https://github.com/copier-org/copier/runs/1241180809?check_suite_focus=true).
tmbo
approved these changes
Oct 14, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I want to use pygments lexers when asking i.e. for YAML or JSON input.
If doing it right now, I get this error:
This should fix it.