From 57d3b92fa4fdd83d29ec194bd00a5ca3b3015a87 Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Mon, 2 Jan 2023 17:31:36 -0800 Subject: [PATCH 1/5] pre-commit hook black->black-jupyter --- .pre-commit-config.yaml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6d885cdc..329918ea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,10 +26,7 @@ # # /WARNING! -exclude: "build|stubs|^bot/templates/|^notebooks/.*\\.ipynb$" - -default_language_version: - python: python3 +exclude: build|stubs|^bot/templates/|^notebooks/.*\\.ipynb$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks @@ -42,12 +39,12 @@ repos: # and which break the standard YAML check. The alternative would be to # skip any unsafe errors (and thus break YAML compatibility) or use # some other checker that may not work in general. - exclude: "^copilot/web/addons/.*$" + exclude: ^copilot/web/addons/.*$ - id: check-json - id: check-case-conflict - id: detect-private-key - id: fix-encoding-pragma - args: ["--remove"] + args: [--remove] - id: forbid-submodules - id: mixed-line-ending - id: requirements-txt-fixer @@ -57,13 +54,13 @@ repos: - id: check-symlinks - id: check-merge-conflict - id: check-added-large-files - args: ["--maxkb=1024"] + args: [--maxkb=1024] - id: end-of-file-fixer - repo: https://github.com/psf/black rev: 22.12.0 hooks: - - id: black + - id: black-jupyter - repo: https://github.com/pycqa/flake8 rev: 6.0.0 @@ -79,7 +76,7 @@ repos: rev: v2.7.1 hooks: - id: prettier - args: ["--prose-wrap=always", "--write"] + args: [--prose-wrap=always, --write] - repo: local hooks: From 413e21176148e3c66bb5d635f667810324ee9258 Mon Sep 17 00:00:00 2001 From: Adrian Cowan Date: Tue, 3 Jan 2023 23:46:34 +1100 Subject: [PATCH 2/5] website: Fix broken e2e tests --- website/src/components/Survey/TaskControls.tsx | 8 ++++++-- website/src/pages/auth/signin.tsx | 3 ++- website/src/pages/create/assistant_reply.tsx | 2 +- website/src/pages/create/user_reply.tsx | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/website/src/components/Survey/TaskControls.tsx b/website/src/components/Survey/TaskControls.tsx index 7847c452..a93889ea 100644 --- a/website/src/components/Survey/TaskControls.tsx +++ b/website/src/components/Survey/TaskControls.tsx @@ -30,9 +30,13 @@ export const TaskControls = (props: TaskControlsProps) => { Skip {endTask.task.type !== "task_done" ? ( - props.onSubmitResponse(props.tasks[0])}>Submit + props.onSubmitResponse(props.tasks[0])}> + Submit + ) : ( - Next Task + + Next Task + )} diff --git a/website/src/pages/auth/signin.tsx b/website/src/pages/auth/signin.tsx index 936a3dbf..221eb1f0 100644 --- a/website/src/pages/auth/signin.tsx +++ b/website/src/pages/auth/signin.tsx @@ -52,8 +52,9 @@ function Signin({ csrfToken, providers }) { {email && (
- +