From d2ee86fc1d04dcecd1116577b6c4a15f02a12d72 Mon Sep 17 00:00:00 2001 From: Elon Gliksberg Date: Fri, 14 Jul 2023 16:40:47 +0300 Subject: [PATCH 1/2] Added the script. --- scripts/install_develop.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 scripts/install_develop.sh diff --git a/scripts/install_develop.sh b/scripts/install_develop.sh new file mode 100755 index 000000000..9df8722ab --- /dev/null +++ b/scripts/install_develop.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# This script installs the package in editable mode in a way that allows static type checkers to work. +# Information about the problem can be found in the following sources: +# - https://github.com/python/mypy/issues/13392 +# - https://microsoft.github.io/pyright/#/import-resolution?id=editable-installs +# - https://setuptools.pypa.io/en/latest/userguide/development_mode.html#legacy-behavior + +pip install -e . --config-settings editable_mode=compat + From 793c6ed3ad21c6de01a64431e92b805800ee137b Mon Sep 17 00:00:00 2001 From: Elon Gliksberg Date: Fri, 14 Jul 2023 19:22:44 +0300 Subject: [PATCH 2/2] Pre-commit matches on everything. --- .github/workflows/run-precommit.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/run-precommit.yml b/.github/workflows/run-precommit.yml index df26d6e2e..6d8c39c8d 100644 --- a/.github/workflows/run-precommit.yml +++ b/.github/workflows/run-precommit.yml @@ -1,10 +1,6 @@ name: Run pre-commit hooks on: push: - paths: - - '**.py' - - '.pre-commit-config.yaml' - - '.github/workflows/run-precommit.yml' workflow_dispatch: jobs: @@ -17,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4.3.0 with: - python-version: '3.8' + python-version: "3.8" # mainly needed so mypy will have the dependencies it needs - name: Install elementary