From 10403833c454bfba23c7bcf37eda16858e1026b6 Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Mon, 4 Dec 2023 21:00:50 -0500 Subject: [PATCH] fix(back): #1200 module name - Use last directory in path as module name in order to avoid breaking the builtin Signed-off-by: Daniel Salazar --- src/args/lint-python/builder.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/args/lint-python/builder.sh b/src/args/lint-python/builder.sh index e310b0f2..65e3678c 100644 --- a/src/args/lint-python/builder.sh +++ b/src/args/lint-python/builder.sh @@ -1,13 +1,5 @@ # shellcheck shell=bash -function get_package_name { - local package_path="${1}" - local package_dir - - : && package_dir="$(basename "${envSrc#*--}")" \ - && echo "${package_dir//-/_}" -} - function main { # If you do `import XXX` in your python code and the structure is like this: # /path/to/XXX @@ -20,7 +12,7 @@ function main { local python_dirs local python_dir - package_name="$(get_package_name "${envSrc}")" \ + package_name="$(basename "${envSrc##*-}")" \ && info Running mypy over: "${package_path}", package "${package_name}" \ && if ! test -e "${package_path}/py.typed"; then error This is not a mypy package, py.typed missing