Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Stopping default import sorting from running in vs code (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
robdmoore authored Apr 17, 2023
1 parent 9f06531 commit a6fa21d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/check-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ jobs:
shell: bash
run: |
set -o pipefail
# set git user and email as test invoke git
git config --global user.email "[email protected]" && git config --global user.name "github-actions"
poetry run pytest --junitxml=pytest-junit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"[python]": {
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
// Prevent default import sorting from running; Ruff will sort imports for us anyway
"source.organizeImports": false
},
"editor.defaultFormatter": null
},
Expand Down
12 changes: 6 additions & 6 deletions tests/test_default_parameters/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 1.1.3-8-g1163e6f
_src_path: /Users/adam/vcs/algokit-beaker-default-template
algod_port: '4001'
_commit: 1.1.4-4-g61a6075
_src_path: /Users/danielm/repos/algorand/algokit-beaker-default-template
algod_port: 4001
algod_server: http://localhost
algod_token: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
author_email: null
author_name: null
author_email: None
author_name: None
deployment_language: python
ide_vscode: true
indexer_port: '8980'
indexer_port: 8980
indexer_server: http://localhost
indexer_token: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
project_name: test_default_parameters
Expand Down
3 changes: 2 additions & 1 deletion tests/test_default_parameters/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"[python]": {
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
// Prevent default import sorting from running; Ruff will sort imports for us anyway
"source.organizeImports": false
},
"editor.defaultFormatter": null
},
Expand Down
8 changes: 8 additions & 0 deletions tests/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def run_init(
*args: str,
template_url: str | None = None,
template_branch: str | None = None,
answers: dict[str, str] | None = None,
) -> subprocess.CompletedProcess:
tests_path = Path(__file__).parent
root = tests_path.parent
Expand Down Expand Up @@ -37,6 +38,13 @@ def run_init(
"--no-git",
"--no-bootstrap",
]
if answers is None:
answers = {
"author_name": "None",
"author_email": "None",
}
for question, answer in answers.items():
init_args.extend(["-a", question, answer])
if template_branch:
init_args.extend(["--template-url-ref", template_branch])
init_args.extend(args)
Expand Down

0 comments on commit a6fa21d

Please sign in to comment.