Skip to content

Commit c40f9a1

Browse files
committed
add ruff, lint the code
1 parent be7b54a commit c40f9a1

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ dev = [
3232
"pytest>=8.3.5",
3333
"pytest-mock>=3.14.1",
3434
"requests-mock>=1.12.1",
35+
"ruff>=0.12.3",
3536
]
3637

3738
[project.scripts]

src/serverless_openapi_generator/openapi_generator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import argparse
22
import json
33
import yaml
4-
import uuid
54
import os
65
import re
76
import subprocess
@@ -411,7 +410,7 @@ def main():
411410
print(f"--- Running pre-hook script: {args.pre_hook} ---")
412411
try:
413412
subprocess.run(['python', args.pre_hook], check=True, text=True)
414-
print(f"--- Pre-hook script finished successfully ---")
413+
print("--- Pre-hook script finished successfully ---")
415414
except FileNotFoundError:
416415
print(f"Error: Pre-hook script not found at {args.pre_hook}")
417416
return

test/test_owasp.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import requests_mock
21
import json
3-
import pytest
42

53
# It's better to import the module we are testing
64
from serverless_openapi_generator import owasp

test/test_schema_handler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import json
22
import pytest
3-
import requests_mock
43
from serverless_openapi_generator.schema_handler import SchemaHandler
54

65
# Mock data similar to the JS test helpers

uv.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)