Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
e7aa6ee9
Unverified
Commit
e7aa6ee9
authored
Mar 17, 2022
by
Matti Picus
Committed by
GitHub
Mar 17, 2022
Browse files
Merge pull request #455 from cclauss/patch-2
GitHub Action to lint Python code
parents
dad30479
392930ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
3 deletions
+27
-3
.github/workflows/lint_python.yml
.github/workflows/lint_python.yml
+23
-0
README.rst
README.rst
+1
-1
supported_wheels.py
supported_wheels.py
+3
-2
No files found.
.github/workflows/lint_python.yml
0 → 100644
View file @
e7aa6ee9
name
:
lint_python
on
:
[
pull_request
,
push
,
workflow_dispatch
]
jobs
:
lint_python
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/setup-python@v2
-
run
:
pip install --upgrade pip wheel
-
run
:
pip install bandit black codespell flake8 flake8-2020 flake8-bugbear
flake8-comprehensions isort mypy pytest pyupgrade safety
-
run
:
bandit --recursive --skip B101 .
# B101 is assert statements
-
run
:
black --check . ||
true
-
run
:
codespell --ignore-words-list="commend"
# --skip="*.css,*.js,*.lock"
-
run
:
flake8 . --count --max-complexity=10 --max-line-length=88
--show-source --statistics
-
run
:
isort --check-only --profile black .
-
run
:
pip install -r requirements.txt || pip install --editable . ||
true
-
run
:
mkdir --parents --verbose .mypy_cache
-
run
:
mypy --ignore-missing-imports --install-types --non-interactive .
-
run
:
pytest . || pytest --doctest-modules . ||
true
-
run
:
shopt -s globstar && pyupgrade --py36-plus **/*.py ||
true
-
run
:
safety check
README.rst
View file @
e7aa6ee9
...
...
@@ -179,7 +179,7 @@ shell scripts listed above are available for your build and test.
Build options are controlled mainly by the following environment
variables:
* ``MB_PYTHON_VER`` sets the Python version target
t
ed: ``major.minor.patch``
* ``MB_PYTHON_VER`` sets the Python version targeted: ``major.minor.patch``
for CPython, or ``pypy-major.minor`` for PyPy.
* ``MB_PYTHON_OSX_VER`` sets the minimum macOS SDK version for any C
extensions. For CPython targets it may be set to 10.6 or 10.9, provided a
...
...
supported_wheels.py
View file @
e7aa6ee9
...
...
@@ -26,13 +26,14 @@ def tags_for(fname):
def
main
():
supported
=
{
(
tag
.
interpreter
,
tag
.
abi
,
tag
.
platform
)
for
tag
in
sys_tags
()
supported
=
{
(
tag
.
interpreter
,
tag
.
abi
,
tag
.
platform
)
for
tag
in
sys_tags
()
}
for
fname
in
sys
.
argv
[
1
:]:
tags
=
set
(
tags_for
(
fname
))
if
supported
.
intersection
(
tags
):
print
(
fname
)
if
__name__
==
'__main__'
:
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment