-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Updating templates #13231
Updating templates #13231
Conversation
@@ -3,35 +3,37 @@ | |||
|
|||
from __future__ import annotations | |||
|
|||
from pathlib import Path |
Check notice
Code scanning / CodeQL
Unused import Note
@@ -3,84 +3,86 @@ | |||
|
|||
from __future__ import annotations | |||
|
|||
from pathlib import Path |
Check notice
Code scanning / CodeQL
Unused import Note
@@ -3,10 +3,11 @@ | |||
|
|||
from __future__ import annotations | |||
|
|||
from pathlib import Path |
Check notice
Code scanning / CodeQL
Unused import Note
@@ -3,10 +3,11 @@ | |||
|
|||
from __future__ import annotations | |||
|
|||
from pathlib import Path |
Check notice
Code scanning / CodeQL
Unused import Note
@@ -3,18 +3,18 @@ | |||
|
|||
from __future__ import annotations | |||
|
|||
from pathlib import Path |
Check notice
Code scanning / CodeQL
Unused import Note
if T.TYPE_CHECKING: | ||
from ..minit import Arguments | ||
|
||
from typing import Dict, Union |
Check notice
Code scanning / CodeQL
Unused import Note
Import of 'Union' is not used.
content = template.format(project_name=options.name, | ||
language=language, | ||
version=options.version, | ||
executable=options.executable, | ||
sourcespec=sourcespec, | ||
depspec=depspec, | ||
default_options=formatted_default_options) |
Check failure
Code scanning / CodeQL
Missing named arguments in formatting call Error
project('{{project_name}}', 'java',
version: '{{version}}',
default_options: [{{default_options}}]) jar('{{executable}}',
{{sourcespec}},
{{depspec}}
main_class: '{{main_class}}',
install: true)
"](1) requires 'main_class', but it is omitted.
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.
There are 29 commits here and none of them have a valid commit message.
From a very quick look at the actual code changes being done here, there's a lot of changes that must not be made. Don't reformat whitespace across 3 dozen files, don't change single quotes to double quotes (the project coding standards are to use single quotes), please divide up your changes into discrete commits that each do one thing and include a commit message describing what those changes do -- "Update xxxxx.py" isn't a good commit message and can't be merged.
This will make the changes much easier to review, so we can look at why he CI is failing.
I'll take a second try at this |
Here are the changes made to the existing code:
Import CythonProject: Added an import statement to import the
CythonProject
class from the Cython templates module.Include CythonProject in
_IMPL
dictionary: Added an entry for'cython'
in the_IMPL
dictionary mapping programming languages to corresponding template classes. This allows thesample_generator
function to retrieve theCythonProject
class based on the language specified in the options.Update
sample_generator
function: Modified thesample_generator
function to retrieve the appropriate template class based on the language specified in the options, including the newly added Cython project template. Now, the function can instantiate the selected template class with the provided options and return the instance, allowing for the generation of Cython projects.These changes enable the
sample_generator
function to generate Cython projects in addition to projects in other supported languages.