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
chenpangpang
transformers
Commits
09eb11a1
Unverified
Commit
09eb11a1
authored
Jan 17, 2024
by
Patrick von Platen
Committed by
GitHub
Jan 17, 2024
Browse files
[Makefile] Exclude research projects from format (#28551)
parent
f4f57f9d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Makefile
Makefile
+6
-4
No files found.
Makefile
View file @
09eb11a1
...
@@ -5,12 +5,14 @@ export PYTHONPATH = src
...
@@ -5,12 +5,14 @@ export PYTHONPATH = src
check_dirs
:=
examples tests src utils
check_dirs
:=
examples tests src utils
exclude_folders
:=
examples/research_projects
modified_only_fixup
:
modified_only_fixup
:
$(
eval
modified_py_files :
=
$(
shell
python utils/get_modified_files.py
$(check_dirs)
))
$(
eval
modified_py_files :
=
$(
shell
python utils/get_modified_files.py
$(check_dirs)
))
@
if
test
-n
"
$(modified_py_files)
"
;
then
\
@
if
test
-n
"
$(modified_py_files)
"
;
then
\
echo
"Checking/fixing
$(modified_py_files)
"
;
\
echo
"Checking/fixing
$(modified_py_files)
"
;
\
ruff check
$(modified_py_files)
--fix
;
\
ruff check
$(modified_py_files)
--fix
--exclude
$(exclude_folders)
;
\
ruff format
$(modified_py_files)
;
\
ruff format
$(modified_py_files)
--exclude
$(exclude_folders)
;
\
else
\
else
\
echo
"No library .py files were modified"
;
\
echo
"No library .py files were modified"
;
\
fi
fi
...
@@ -65,8 +67,8 @@ extra_style_checks:
...
@@ -65,8 +67,8 @@ extra_style_checks:
# this target runs checks on all files and potentially modifies some of them
# this target runs checks on all files and potentially modifies some of them
style
:
style
:
ruff check
$(check_dirs)
setup.py conftest.py
--fix
ruff check
$(check_dirs)
setup.py conftest.py
--fix
--exclude
$(exclude_folders)
ruff format
$(check_dirs)
setup.py conftest.py
ruff format
$(check_dirs)
setup.py conftest.py
--exclude
$(exclude_folders)
${MAKE}
autogenerate_code
${MAKE}
autogenerate_code
${MAKE}
extra_style_checks
${MAKE}
extra_style_checks
...
...
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