-
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.
chore: add ruff for code formatting (#61)
- Loading branch information
Showing
17 changed files
with
785 additions
and
590 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
"""Export classes and functions for Nada DSL auditing component.""" | ||
|
||
import argparse | ||
|
||
from nada_dsl.audit.abstract import * | ||
from nada_dsl.audit.report import html | ||
from nada_dsl.audit.strict import strict | ||
|
||
|
||
def _main(): | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('path', nargs=1, help='Nada DSL source file path') | ||
parser.add_argument('--strict', action='store_true', required=True) | ||
parser.add_argument("path", nargs=1, help="Nada DSL source file path") | ||
parser.add_argument("--strict", action="store_true", required=True) | ||
args = parser.parse_args() | ||
path = args.path[0] | ||
|
||
with open(path, 'r', encoding='UTF-8') as file: | ||
with open(path, "r", encoding="UTF-8") as file: | ||
source = file.read() | ||
report = strict(source) | ||
|
||
with open(path[:-2] + 'html', 'w', encoding='UTF-8') as file: | ||
with open(path[:-2] + "html", "w", encoding="UTF-8") as file: | ||
file.write(html(report)) |
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,3 +1,5 @@ | ||
"""Execute the command line interface entry point.""" | ||
|
||
from nada_dsl.audit import _main | ||
|
||
_main() |
Oops, something went wrong.