dev #10

Merged
李衍志523370910113 merged 238 commits from dev into master 2025-03-05 16:20:39 +08:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 63f154c540 - Show all commits

View File

@ -1,5 +1,5 @@
from datetime import datetime, timedelta
jon-lee marked this conversation as resolved Outdated

every field in this file should not be optional. we give an default value here if any field does not exist

every field in this file should not be optional. we give an default value here if any field does not exist

and use underscore naming in this file

and use underscore naming in this file

every field in this file should not be optional. we give an default value here if any field does not exist

fixed

> every field in this file should not be optional. we give an default value here if any field does not exist fixed

and use underscore naming in this file

fixed.

> and use underscore naming in this file fixed.
from enum import StrEnum
from enum import Enum
from pathlib import Path
from typing import Any, Dict, List, Type
@ -81,7 +81,7 @@ class Limit(BaseModel):
raise ValueError("Must be a string")
class Parser(StrEnum):
class Parser(str, Enum):
CLANG_TIDY = "clangtidy"
jon-lee marked this conversation as resolved Outdated

deprecated

deprecated

@bomingzh any suggestions on the structure?

@bomingzh any suggestions on the structure?
PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.9/migration/
``` PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.9/migration/ ```

fixed with model_config

fixed with `model_config`

str here need to be a StrEnum now.

str here need to be a `StrEnum` now.

But I guess we don't know the set of case in advance, making it dynamic StrEnum is meaningless

But I guess we don't know the set of case in advance, making it dynamic `StrEnum` is meaningless

line changed, the comment is for parsers

line changed, the comment is for `parsers`
CPPCHECK = "cppcheck"
CPPLINT = "cpplint"
jon-lee marked this conversation as resolved Outdated

this should be the StrEnum

this should be the `StrEnum`

It is supported now.

It is supported now.

View File

@ -11,10 +11,10 @@ dependencies = [
"loguru>=0.7.2",
"pydantic>=2.9.2",
"inquirer>=3.4.0",
"rtoml>=0.12.0",
"rtoml>=0.11.0",
"humanfriendly>=10.0",
]
requires-python = ">=3.11"
requires-python = ">=3.9"
authors = [{ name = "JOJ3-dev", email = "joj3@focs.ji.sjtu.edu.cn" }]
maintainers = []
description = "JOJ3 json configuration file generator"