Skip to content

Commit

Permalink
MAINT: recommend black extension for vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Aug 7, 2023
1 parent c469d3e commit 752a3f9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ vscode:
- garaioag.garaio-vscode-unwanted-recommendations
- github.vscode-github-actions
- github.vscode-pull-request-github
- ms-python.black-formatter
- ms-python.mypy-type-checker
- ms-python.python
- ms-python.vscode-pylance
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"garaioag.garaio-vscode-unwanted-recommendations",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"ms-python.black-formatter",
"ms-python.mypy-type-checker",
"ms-python.python",
"ms-python.vscode-pylance",
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"black-formatter.importStrategy": "fromEnvironment",
"coverage-gutters.coverageFileNames": ["coverage.xml"],
"coverage-gutters.coverageReportFileName": "**/htmlcov/index.html",
"coverage-gutters.showGutterCoverage": false,
Expand Down
3 changes: 3 additions & 0 deletions src/repoma/check_dev_files/black.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
write_pyproject,
)
from repoma.utilities.setup_cfg import get_supported_python_versions
from repoma.utilities.vscode import add_extension_recommendation, set_setting


def main() -> None:
Expand All @@ -28,6 +29,8 @@ def main() -> None:
executor(_update_black_settings)
executor(_update_precommit_repo)
executor(_update_precommit_nbqa_hook)
executor(add_extension_recommendation, "ms-python.black-formatter")
executor(set_setting, {"black-formatter.importStrategy": "fromEnvironment"})
executor(update_nbqa_settings, "black", to_toml_array(["--line-length=85"]))
executor.finalize()

Expand Down

0 comments on commit 752a3f9

Please sign in to comment.