Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
76e7a44d
Unverified
Commit
76e7a44d
authored
Nov 09, 2020
by
Julien Plu
Committed by
GitHub
Nov 09, 2020
Browse files
Fix some tooling for windows (#8359)
* Fix some tooling for windows * Fix conflict * Trigger CI
parent
507dfb40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
utils/check_repo.py
utils/check_repo.py
+2
-2
No files found.
utils/check_repo.py
View file @
76e7a44d
...
...
@@ -163,7 +163,7 @@ def get_model_doc_files():
def
find_tested_models
(
test_file
):
""" Parse the content of test_file to detect what's in all_model_classes"""
# This is a bit hacky but I didn't find a way to import the test_file as a module and read inside the class
with
open
(
os
.
path
.
join
(
PATH_TO_TESTS
,
test_file
))
as
f
:
with
open
(
os
.
path
.
join
(
PATH_TO_TESTS
,
test_file
)
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
content
=
f
.
read
()
all_models
=
re
.
findall
(
r
"all_model_classes\s+=\s+\(\s*\(([^\)]*)\)"
,
content
)
# Check with one less parenthesis
...
...
@@ -221,7 +221,7 @@ def check_all_models_are_tested():
def
find_documented_classes
(
doc_file
):
""" Parse the content of doc_file to detect which classes it documents"""
with
open
(
os
.
path
.
join
(
PATH_TO_DOC
,
doc_file
))
as
f
:
with
open
(
os
.
path
.
join
(
PATH_TO_DOC
,
doc_file
)
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
content
=
f
.
read
()
return
re
.
findall
(
r
"autoclass:: transformers.(\S+)\s+"
,
content
)
...
...
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