File tree Expand file tree Collapse file tree 10 files changed +27
-19
lines changed
code_generation/doc_utils Expand file tree Collapse file tree 10 files changed +27
-19
lines changed Original file line number Diff line number Diff line change 1
1
from enum import Enum
2
2
from typing import TypeVar
3
3
4
- from pydantic import BaseModel , Field
4
+ from pydantic import BaseModel
5
+ from pydantic .fields import Field
5
6
6
7
from codegen .cli .utils .constants import ProgrammingLanguage
7
8
from codegen .cli .utils .schema import SafeBaseModel
@@ -64,8 +65,8 @@ class AskExpertResponse(SafeBaseModel):
64
65
65
66
66
67
class SerializedExample (SafeBaseModel ):
67
- name : str | None
68
- description : str | None
68
+ name : str | None = None
69
+ description : str | None = None
69
70
source : str
70
71
language : ProgrammingLanguage
71
72
docstring : str = ""
@@ -123,11 +124,11 @@ class User(SafeBaseModel):
123
124
auth_user_id : str
124
125
created_at : str
125
126
email : str
126
- is_contractor : str | None
127
+ is_contractor : str | None = None
127
128
github_username : str
128
- full_name : str | None
129
+ full_name : str | None = None
129
130
id : int
130
- last_updated_at : str | None
131
+ last_updated_at : str | None = None
131
132
132
133
auth_context : AuthContext
133
134
user : User
Original file line number Diff line number Diff line change 1
- from pydantic import BaseModel , Field
1
+ from pydantic import BaseModel
2
+ from pydantic .fields import Field
2
3
3
4
import codegen .cli .sdk .decorator
4
5
from codegen .cli .utils .count_functions_2 import NumberType
Original file line number Diff line number Diff line change 1
1
import logging
2
2
from typing import Any
3
3
4
- from pydantic import BaseModel , Field
4
+ from pydantic import BaseModel
5
+ from pydantic .fields import Field
5
6
6
7
from codegen .git .models .pull_request_context import PullRequestContext
7
8
Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ class PullRequestContext(BaseModel):
19
19
draft : bool
20
20
head : PRPartContext
21
21
base : PRPartContext
22
- merged : bool | None
23
- merged_by : dict | None
24
- additions : int | None
25
- deletions : int | None
26
- changed_files : int | None
22
+ merged : bool | None = None
23
+ merged_by : dict | None = None
24
+ additions : int | None = None
25
+ deletions : int | None = None
26
+ changed_files : int | None = None
27
27
github_type : GithubType | None = None
28
28
webhook_data : dict | None = None
29
29
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class CodemodRunResult(BaseModel):
49
49
50
50
class CreatedBranch (BaseModel ):
51
51
base_branch : str
52
- head_ref : str | None
52
+ head_ref : str | None = None
53
53
54
54
55
55
class SandboxRunnerTag (BaseModel ):
Original file line number Diff line number Diff line change 1
1
import base64
2
2
import os
3
3
4
- from pydantic import BaseModel , ConfigDict
4
+ from pydantic import BaseModel
5
+ from pydantic .config import ConfigDict
5
6
6
7
from codegen .git .schemas .repo_config import RepoConfig
7
8
from codegen .runner .constants .envvars import FEATURE_FLAGS_BASE64 , REPO_CONFIG_BASE64
Original file line number Diff line number Diff line change 1
1
from typing import Literal
2
2
3
- from pydantic import BaseModel , Field
3
+ from pydantic import BaseModel
4
+ from pydantic .fields import Field
4
5
5
6
6
7
class ParameterDoc (BaseModel ):
Original file line number Diff line number Diff line change 1
1
import os
2
2
from typing import Self
3
3
4
- from pydantic import BaseModel , ConfigDict , Field
4
+ from pydantic import BaseModel
5
+ from pydantic .config import ConfigDict
6
+ from pydantic .fields import Field
5
7
6
8
from codegen .git .repo_operator .local_repo_operator import LocalRepoOperator
7
9
from codegen .git .repo_operator .repo_operator import RepoOperator
Original file line number Diff line number Diff line change 1
1
from typing import Self
2
2
3
3
from openai import BaseModel
4
- from pydantic import ConfigDict
4
+ from pydantic . config import ConfigDict
5
5
6
6
from codegen .sdk .codebase .span import Span
7
7
Original file line number Diff line number Diff line change 1
- from pydantic import BaseModel , ConfigDict
1
+ from pydantic import BaseModel
2
+ from pydantic .config import ConfigDict
2
3
3
4
from codegen .sdk .codebase .span import Span
4
5
You can’t perform that action at this time.
0 commit comments