fix: resolve CI linting failures
- Fix corrupted docstrings (curly braces to quotes) - Sort imports according to ruff standards - Split long line in javascript.py for readability - Add module-level docstrings to test files - Add docstring to BaseGenerator.__init__ method - Fix regex pattern in RustDetector
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
"""Go endpoint detector for Gin and chi."""
|
"""Go endpoint detector for Gin and chi."""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from docgen.models import Endpoint, HTTPMethod
|
|
||||||
from docgen.detectors.base import BaseDetector
|
from docgen.detectors.base import BaseDetector
|
||||||
|
from docgen.models import Endpoint, HTTPMethod
|
||||||
|
|
||||||
|
|
||||||
class GoDetector(BaseDetector):
|
class GoDetector(BaseDetector):
|
||||||
@@ -19,7 +21,7 @@ class GoDetector(BaseDetector):
|
|||||||
)
|
)
|
||||||
|
|
||||||
GIN_HANDLE_PATTERN = re.compile(
|
GIN_HANDLE_PATTERN = re.compile(
|
||||||
r'(?:routers?|router)\s*\.\s*Handle\s*\("(GET|POST|PUT|PATCH|DELETE|OPTIONS|HEAD)"\s*,\s*"([^"]+)"',
|
r'(?:routers?|router)\s*\.\s*Handle\s*\(\s*"(GET|POST|PUT|PATCH|DELETE|OPTIONS|HEAD)"\s*,\s*"([^"]+)"',
|
||||||
re.MULTILINE,
|
re.MULTILINE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user