Skip to content

Commit

Permalink
Merge pull request #1201 from dsalaza4/main
Browse files Browse the repository at this point in the history
feat(back): #1200 support hidden files in root
  • Loading branch information
dsalaza4 authored Dec 4, 2023
2 parents 0999bb4 + 5952293 commit 31455b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/args/lint-python/builder.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# 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
Expand All @@ -12,7 +20,7 @@ function main {
local python_dirs
local python_dir

package_name="$(basename "${envSrc#*-}")" \
package_name="$(get_package_name "${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
Expand Down
2 changes: 1 addition & 1 deletion src/args/project-path/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ then
name =
if rel == "/"
then "src"
else builtins.baseNameOf rel;
else builtins.replaceStrings ["/"] ["-"] rel;
path = (builtins.unsafeDiscardStringContext projectSrc) + rel;
})
else abort "projectPath arguments must start with: /, currently it is: ${rel}"

0 comments on commit 31455b0

Please sign in to comment.