Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refac(back): #1200 remove prefix #1205

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/args/lint-python/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function main {
local python_dirs
local python_dir

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