-
Notifications
You must be signed in to change notification settings - Fork 54
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
Makefile Linter | Python & Javascript #353
base: main
Are you sure you want to change the base?
Makefile Linter | Python & Javascript #353
Conversation
0c80b67
to
94e47f8
Compare
Wow! Thank you Phu. This is a massive change. I might need some more time to properly review :-) A few quick observations:
|
|
Hi @BluThaitanium -- maybe we can add another Make target to actually fix the Python code violations. We could collaborate on that (seeing that I accidentally already committed onto your branch 8-)
i.e.: .PHONY: format_python
format_python: venv ## Correct Python code style violations
@which autoflake > /dev/null || pip install autoflake
@which autopep8 > /dev/null || pip install autopep8
@autoflake api tools/python -i --recursive --remove-all-unused-imports \
--ignore-init-module-imports --remove-unused-variables
@autopep8 api/ tools/python/ -i --recursive -a -a -a --experimental \
--select=E9,E2,E3,E5,F63,F7,F82,F4,F841,W291,W292 \
--exclude .git,__pycache__,docs/source/conf.py,old,build,dist,venv \
--max-line-length=140
@echo "$@: OK" After that I am down to this manageable number of code style violations:
With the auto-fix we could also include the generated API code in the linting, and I could add it to the generate_code script later on to not repeatedly have the violations reappear. |
7659afe
to
297931d
Compare
Signed-off-by: BluThaitanium <[email protected]>
Signed-off-by: BluThaitanium <[email protected]>
Signed-off-by: BluThaitanium <[email protected]>
Signed-off-by: BluThaitanium <[email protected]>
Signed-off-by: BluThaitanium <[email protected]>
* Update MLX setup instructions for KF 1.5 Signed-off-by: Christian Kadner <[email protected]> Signed-off-by: BluThaitanium <[email protected]>
…ange#342) Signed-off-by: Jiaxuan-Yang <[email protected]> Signed-off-by: BluThaitanium <[email protected]>
Signed-off-by: BluThaitanium <[email protected]>
Signed-off-by: BluThaitanium <[email protected]>
* Also add combine lint target Signed-off-by: Christian Kadner <[email protected]> Signed-off-by: BluThaitanium <[email protected]>
Signed-off-by: BluThaitanium <[email protected]>
297931d
to
6ab3372
Compare
Context
Enforce code-style by creating a linting target in the Makefile. Lints Python and Javascript.
Addressed Issue #322
Changes
make
calls for Python (.py) and Javascript (.js, .jsx, .ts, .tsx)** Called via
make lint_python
andmake lint_javascript
** Linting via
flake8
andeslint
/dashboard/origin-mlx/.eslintrc.yml
.py
files to meet flake8-PEP8 standardspackage-lock.json
andpackage.json
for ReactJS support for eslintNotes
.eslintrc.yml
'soverrides
parameters store rules that require large changes to the current codebase. These rules are therefore disabled.venv
in the main/mlx/
directory