|
21 | 21 | # --------------------------------------------
|
22 | 22 |
|
23 | 23 | # Version
|
24 |
| -VERSION=2.1.4 |
| 24 | +VERSION=2.1.5 |
25 | 25 |
|
26 | 26 | # Toolset
|
27 | 27 | TOOLSET="bandit black codespell mypy pylint pyright pylama ruff safety"
|
@@ -86,6 +86,7 @@ okrutnik_install() {
|
86 | 86 | print "$ARG3"
|
87 | 87 | ${PIP} install -r $ARG3
|
88 | 88 | fi
|
| 89 | + custom_crossplane_hack |
89 | 90 | echo -e "${CYAN}Receiving communication...${ENDCOLOR}"
|
90 | 91 | echo -e "-> ${GREEN}All your base are belong to us${ENDCOLOR} 👽"
|
91 | 92 | }
|
@@ -127,6 +128,16 @@ okrutnik_which_python() {
|
127 | 128 | fi
|
128 | 129 | }
|
129 | 130 |
|
| 131 | +# Custom modules hacks |
| 132 | +function custom_crossplane_hack() { |
| 133 | + crossplane_path=$(dirname ${VENV}/lib/python*/site-packages) |
| 134 | + if [[ -d $crossplane_path ]]; then |
| 135 | + echo "Crossplane detected: committing a hack" |
| 136 | + touch ${crossplane_path}/site-packages/crossplane/py.typed |
| 137 | + sed -i 's/parse(filename,/parse(filename: str,/g;' ${crossplane_path}/site-packages/crossplane/parser.py |
| 138 | + fi |
| 139 | +} |
| 140 | + |
130 | 141 | # --------------------------------------------
|
131 | 142 | # Validation / args handling
|
132 | 143 | # --------------------------------------------
|
@@ -214,16 +225,15 @@ mypy --install-types --non-interactive --strict $TARGET ; pass
|
214 | 225 |
|
215 | 226 | # pylint
|
216 | 227 | print "pylint (${ITERATION}/${TOOLS_NUM})"
|
217 |
| -echo "W0718: (broad-exception-caught) is disabled" |
218 |
| -pylint --disable W0718 $TARGET ; pass |
| 228 | +pylint $TARGET ; pass |
219 | 229 |
|
220 | 230 | # pyright
|
221 | 231 | print "pyright (${ITERATION}/${TOOLS_NUM})"
|
222 | 232 | pyright $TARGET ; pass
|
223 | 233 |
|
224 | 234 | # bandit
|
225 | 235 | print "bandit (${ITERATION}/${TOOLS_NUM})"
|
226 |
| -bandit --quiet $TARGET ; pass |
| 236 | +bandit --quiet -r $TARGET ; pass |
227 | 237 |
|
228 | 238 | # --------------------------------------------
|
229 | 239 | # Formatter
|
|
0 commit comments