Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Woazboat
flow3r firmware
Commits
a73502fd
Commit
a73502fd
authored
1 year ago
by
Woazboat
Browse files
Options
Downloads
Patches
Plain Diff
Re-add mypy script
parent
b07a77d8
No related branches found
No related tags found
No related merge requests found
Pipeline
#7375
passed
1 year ago
Stage: check
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/mypy.sh
+37
-0
37 additions, 0 deletions
tools/mypy.sh
with
37 additions
and
0 deletions
tools/mypy.sh
0 → 100755
+
37
−
0
View file @
a73502fd
#!/usr/bin/env bash
set
-e
-u
if
[
!
-f
sdkconfig.defaults
]
||
[
!
-f
recovery/sdkconfig.defaults
]
;
then
echo
>
/dev/stderr
"Run this script for the root of the repository (ie. tools/mypy.sh)."
exit
1
fi
export
MYPYPATH
=
$(
pwd
)
/python_payload/mypystubs:
$(
pwd
)
/python_payload
echo
"Checking st3m..."
_CI
=
"
${
CI
:-}
"
if
[
!
-z
"
${
_CI
}
"
]
;
then
:
>
warnings.txt
fi
failed
=
""
function
_mypy
()
{
if
[
!
-z
"
${
_CI
}
"
]
;
then
mypy
"
$1
"
--strict
--no-color-output
>>
warnings.txt
||
failed
=
true
else
mypy
"
$1
"
--strict
||
failed
=
true
fi
}
_mypy python_payload/main.py
for
f
in
python_payload/apps/
*
/flow3r.toml
;
do
app_name
=
"
$(
basename
$(
dirname
$f
))
"
echo
"Checking
${
app_name
}
..."
_mypy python_payload/apps/
${
app_name
}
done
if
[
$failed
]
;
then
echo
"Failed"
exit
1
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment