- Fixed import sorting in cli.py, __main__.py, detectors/__init__.py, base.py, python.py, rust.py, openapi.py, models/__init__.py - Removed unused imports (sys, asyncio, Observer, Text, Parameter, ParameterIn, HTTPMethod, DocConfig, List, Optional) - Removed trailing whitespace from blank lines - Split lines exceeding 100 characters - Added missing __init__ docstrings in generators and static/templates packages
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
"""Python endpoint detector for FastAPI, Flask, and Django."""
|
{"""Python endpoint detector for FastAPI, Flask, and Django."""
|
||||||
|
|
||||||
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, Parameter, ParameterIn
|
|
||||||
from docgen.detectors.base import BaseDetector
|
from docgen.detectors.base import BaseDetector
|
||||||
|
from docgen.models import Endpoint, HTTPMethod
|
||||||
|
|
||||||
|
|
||||||
class PythonDetector(BaseDetector):
|
class PythonDetector(BaseDetector):
|
||||||
@@ -49,6 +50,7 @@ class PythonDetector(BaseDetector):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
"""Initialize the Python detector."""
|
||||||
self.framework: Optional[str] = None
|
self.framework: Optional[str] = None
|
||||||
|
|
||||||
def detect_endpoints(self, file_path: Path) -> list[Endpoint]:
|
def detect_endpoints(self, file_path: Path) -> list[Endpoint]:
|
||||||
|
|||||||
Reference in New Issue
Block a user