chore: reformat code style with consistent quotes, trailing commas, and spacing across auth, billing, and models
This commit is contained in:
+20
-16
@@ -7,7 +7,7 @@ for various legal policies required for a European cloud storage provider.
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from datetime import datetime
|
||||
from typing import Dict, Any
|
||||
from typing import Dict
|
||||
|
||||
|
||||
class LegalDocument(ABC):
|
||||
@@ -17,10 +17,13 @@ class LegalDocument(ABC):
|
||||
Provides common structure and methods for generating legal content.
|
||||
"""
|
||||
|
||||
def __init__(self, company_name: str = "MyWebdav Technologies",
|
||||
last_updated: str = None,
|
||||
contact_email: str = "legal@mywebdav.eu",
|
||||
website: str = "https://mywebdav.eu"):
|
||||
def __init__(
|
||||
self,
|
||||
company_name: str = "MyWebdav Technologies",
|
||||
last_updated: str = None,
|
||||
contact_email: str = "legal@mywebdav.eu",
|
||||
website: str = "https://mywebdav.eu",
|
||||
):
|
||||
self.company_name = company_name
|
||||
self.last_updated = last_updated or datetime.now().strftime("%B %d, %Y")
|
||||
self.contact_email = contact_email
|
||||
@@ -853,20 +856,21 @@ class ContactComplaintMechanism(LegalDocument):
|
||||
def get_all_legal_documents() -> Dict[str, LegalDocument]:
|
||||
"""Return a dictionary of all legal document instances."""
|
||||
return {
|
||||
'privacy_policy': PrivacyPolicy(),
|
||||
'terms_of_service': TermsOfService(),
|
||||
'security_policy': SecurityPolicy(),
|
||||
'cookie_policy': CookiePolicy(),
|
||||
'data_processing_agreement': DataProcessingAgreement(),
|
||||
'compliance_statement': ComplianceStatement(),
|
||||
'data_portability_deletion_policy': DataPortabilityDeletionPolicy(),
|
||||
'contact_complaint_mechanism': ContactComplaintMechanism(),
|
||||
"privacy_policy": PrivacyPolicy(),
|
||||
"terms_of_service": TermsOfService(),
|
||||
"security_policy": SecurityPolicy(),
|
||||
"cookie_policy": CookiePolicy(),
|
||||
"data_processing_agreement": DataProcessingAgreement(),
|
||||
"compliance_statement": ComplianceStatement(),
|
||||
"data_portability_deletion_policy": DataPortabilityDeletionPolicy(),
|
||||
"contact_complaint_mechanism": ContactComplaintMechanism(),
|
||||
}
|
||||
|
||||
|
||||
def generate_legal_documents(output_dir: str = "static/legal"):
|
||||
"""Generate all legal documents as Markdown and HTML files."""
|
||||
import os
|
||||
|
||||
os.makedirs(output_dir, exist_ok=True)
|
||||
|
||||
documents = get_all_legal_documents()
|
||||
@@ -875,17 +879,17 @@ def generate_legal_documents(output_dir: str = "static/legal"):
|
||||
# Generate Markdown
|
||||
md_filename = f"{doc_name}.md"
|
||||
md_path = os.path.join(output_dir, md_filename)
|
||||
with open(md_path, 'w') as f:
|
||||
with open(md_path, "w") as f:
|
||||
f.write(doc.to_markdown())
|
||||
|
||||
# Generate HTML
|
||||
html_filename = f"{doc_name}.html"
|
||||
html_path = os.path.join(output_dir, html_filename)
|
||||
with open(html_path, 'w') as f:
|
||||
with open(html_path, "w") as f:
|
||||
f.write(doc.to_html())
|
||||
|
||||
print(f"Generated {md_filename} and {html_filename}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
generate_legal_documents()
|
||||
generate_legal_documents()
|
||||
|
||||
Reference in New Issue
Block a user