forked from openzim/wp1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_types.sh
More file actions
executable file
·39 lines (35 loc) · 1.07 KB
/
Copy pathcheck_types.sh
File metadata and controls
executable file
·39 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# Run ty type checking against the subset of files that are fully annotated.
#
# Add a file to TYPED_FILES once it has type hints throughout. CI invokes
# this script directly, so updates here are the single source of truth.
#
# Usage:
# ./check_types.sh # check all files in TYPED_FILES
# ./check_types.sh wp1/foo.py # check a specific file (overrides the list)
set -e
TYPED_FILES=(
wp1/models/wp10/builder.py
wp1/models/wp10/selection.py
wp1/models/wp10/zim_file.py
wp1/models/wp10/zim_schedule.py
wp1/logic/builder.py
wp1/logic/selection.py
wp1/logic/zim_files.py
wp1/logic/zim_schedules.py
wp1/selection/abstract_builder.py
wp1/selection/meta_builder.py
wp1/selection/meta_builder_test.py
wp1/selection/models/simple.py
wp1/selection/models/petscan.py
wp1/selection/models/sparql.py
wp1/selection/models/wikiproject.py
wp1/selection/models/book.py
wp1/selection/models/combinator.py
wp1/selection/models/combinator_test.py
)
if [ "$#" -gt 0 ]; then
pipenv run ty check "$@"
else
pipenv run ty check "${TYPED_FILES[@]}"
fi