-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from corail-research/linting
Linting
- Loading branch information
Showing
20 changed files
with
87 additions
and
741 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
"""Generate the code reference pages.""" | ||
|
||
import re | ||
from pathlib import Path | ||
|
||
import mkdocs_gen_files | ||
import re | ||
|
||
for path in sorted(Path("src").rglob("*.py")): # | ||
if len(re.findall('(^|/)__',str(path))): | ||
for path in sorted(Path("src").rglob("*.py")): | ||
if len(re.findall("(^|/)__",str(path))): | ||
continue | ||
|
||
module_path = path.relative_to("src").with_suffix("") # | ||
doc_path = path.relative_to("src").with_suffix(".md") # | ||
full_doc_path = Path("reference", doc_path) # | ||
module_path = path.relative_to("src").with_suffix("") | ||
doc_path = path.relative_to("src").with_suffix(".md") | ||
full_doc_path = Path("reference", doc_path) | ||
|
||
parts = list(module_path.parts) | ||
|
||
if parts[-1] == "__init__": # | ||
if parts[-1] == "__init__": | ||
parts = parts[:-1] | ||
elif parts[-1] == "__main__": | ||
continue | ||
|
||
with mkdocs_gen_files.open(full_doc_path, "w") as fd: # | ||
identifier = ".".join(parts) # | ||
print("::: " + identifier, file=fd) # | ||
with mkdocs_gen_files.open(full_doc_path, "w") as fd: | ||
identifier = ".".join(parts) | ||
print("::: " + identifier, file=fd) | ||
|
||
mkdocs_gen_files.set_edit_path(full_doc_path, path) # | ||
mkdocs_gen_files.set_edit_path(full_doc_path, path) |
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.