- Standardize quote style (single to double quotes) - Improve code formatting consistency - Apply formatting to utilities, GUI components, and tools - Update imports and docstrings for consistency Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
52 lines
1.2 KiB
Python
52 lines
1.2 KiB
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
"""
|
|
默认配置值
|
|
|
|
定义所有配置项的默认值。
|
|
"""
|
|
from config.schema import (
|
|
ERPConfig,
|
|
DatabaseConfig,
|
|
PathConfig,
|
|
ExtractionConfig,
|
|
AppConfig,
|
|
)
|
|
|
|
|
|
# 默认配置
|
|
DEFAULT_APP_CONFIG = AppConfig(
|
|
erp=ERPConfig(
|
|
url="https://68.11.34.30:8082/",
|
|
username="BLDpengqiangqiang",
|
|
password="Cqbld123456.",
|
|
headless=True,
|
|
ignore_https_errors=True,
|
|
auto_close_browser=True,
|
|
),
|
|
database=DatabaseConfig(
|
|
server="192.168.110.114",
|
|
database="CompanyDB",
|
|
username="peng",
|
|
password="Cqbld123456.",
|
|
driver="ODBC Driver 18 for SQL Server",
|
|
trust_server_certificate="yes",
|
|
),
|
|
paths=PathConfig(
|
|
data_dir="D:/python/playwrite/data/",
|
|
production_id_file="ProductionID.txt",
|
|
default_output="离散备料计划维护_合并.xlsx",
|
|
validation_output="物料状态校验结果.xlsx",
|
|
),
|
|
extraction=ExtractionConfig(
|
|
batch_size=100,
|
|
verbose=True,
|
|
auto_convert=True,
|
|
merge_batches=True,
|
|
),
|
|
)
|
|
|
|
|
|
# 兼容旧版本的字典格式
|
|
DEFAULT_SETTINGS_DICT = DEFAULT_APP_CONFIG.to_dict()
|