Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
with:
python-version: "3.10"

- name: Install Python dependencies
run: pip install black flake8 mypy pydantic types-requests

- name: Install Poetry
uses: snok/install-poetry@v1
with:
Expand Down Expand Up @@ -55,3 +52,6 @@ jobs:
mypy: true
mypy_args: "th_cli/main.py"
mypy_command_prefix: "poetry run "

- name: Run isort
run: poetry run isort --check-only th_cli
2 changes: 1 addition & 1 deletion scripts/generate_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd .. && pwd)"

#Using an array to store the arguments, to handle 'whitespaces' correctly
args=("$@")
poetry run $PROJECT_ROOT/scripts/datamodel_generate_client.py "${args[@]}"
poetry run "$PROJECT_ROOT/scripts/datamodel_generate_client.py" "${args[@]}"
1 change: 1 addition & 0 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -e
set -x

PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd .. && pwd)"
Expand Down
6 changes: 3 additions & 3 deletions scripts/th_cli_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ CHANGE_WARNING="# WARNING: This file was copied from the backend's $SHARED_CONST

echo "Installing Matter CLI..."
# Copy requirements from backend
if [ ! -f $SHARED_CONST_DIR/$SHARED_CONST_FILE ]; then
if [ ! -f "$SHARED_CONST_DIR/$SHARED_CONST_FILE" ]; then
echo "Shared constants file not found in backend directory: $SHARED_CONST_DIR/$SHARED_CONST_FILE"
exit 1
fi
cp -r $SHARED_CONST_DIR/$SHARED_CONST_FILE $PROJECT_ROOT/th_cli/
sed -i "1s/^/#\n$CHANGE_WARNING\n/" $PROJECT_ROOT/th_cli/$SHARED_CONST_FILE # Add warning to the copied file
cp -r "$SHARED_CONST_DIR/$SHARED_CONST_FILE" "$PROJECT_ROOT/th_cli/"
sed -i "1s/^/#\n$CHANGE_WARNING\n/" "$PROJECT_ROOT/th_cli/$SHARED_CONST_FILE" # Add warning to the copied file

# Check if pipx is installed
if ! command -v pipx &> /dev/null; then
Expand Down
Loading