bug: mypy should ignore files in test/ (#3894)

* exclude files in test/

* verify that the CI ignores test files

* dont fail in case of no files
This commit is contained in:
ZanSara 2023-01-19 18:12:26 +01:00 committed by GitHub
parent 4c28253955
commit 90c877a559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -93,7 +93,9 @@ jobs:
run: |
for file in ${{ steps.files.outputs.all_changed_files }}; do
if [[ $file == *.py ]]; then
changed_files="$changed_files $file"
if [[ $file != test/* ]]; then
changed_files="$changed_files $file"
fi
fi
done
echo "changed_files=$changed_files" >> $GITHUB_OUTPUT
@ -104,6 +106,7 @@ jobs:
pythonVersion: 3.8 # Literals and mypy just don't work well together.
- name: Mypy
if: steps.python-files.outputs.changed_files
run: |
mkdir .mypy_cache/
mypy ${{ steps.python-files.outputs.changed_files }}

View File

@ -35,7 +35,6 @@ from haystack.document_stores import (
OpenSearchDocumentStore,
GraphDBKnowledgeGraph,
FAISSDocumentStore,
SQLDocumentStore,
)
from haystack.nodes import (
BaseReader,