This is an automated email from the ASF dual-hosted git repository.

warren pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 816e5faa4 fix: type annotations (#4678)
816e5faa4 is described below

commit 816e5faa4084717632feef1a179a3e1c3237e0e7
Author: Sam Crang <[email protected]>
AuthorDate: Thu Mar 16 01:54:20 2023 +0000

    fix: type annotations (#4678)
    
    I don't think these are right. Without this change it seems as though
    the value in the DB will always be set to something like:
    
    ```
    typing.Optional[pydevlake.domain_layer.devops.CICDResult]
    ```
---
 backend/python/pydevlake/pydevlake/domain_layer/code.py   | 2 +-
 backend/python/pydevlake/pydevlake/domain_layer/devops.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/backend/python/pydevlake/pydevlake/domain_layer/code.py 
b/backend/python/pydevlake/pydevlake/domain_layer/code.py
index 0ca38bab9..146ac9a11 100644
--- a/backend/python/pydevlake/pydevlake/domain_layer/code.py
+++ b/backend/python/pydevlake/pydevlake/domain_layer/code.py
@@ -75,7 +75,7 @@ class Commit(NoPKModel, table=True):
     __tablename__ = 'commits'
     sha: str = Field(primary_key=True)
     additions: str
-    deletions: str = Optional[str]
+    deletions: Optional[str]
     dev_eq: Optional[str]
     message: str
     author_name: str
diff --git a/backend/python/pydevlake/pydevlake/domain_layer/devops.py 
b/backend/python/pydevlake/pydevlake/domain_layer/devops.py
index 2a12d2348..934ac5b2b 100644
--- a/backend/python/pydevlake/pydevlake/domain_layer/devops.py
+++ b/backend/python/pydevlake/pydevlake/domain_layer/devops.py
@@ -83,7 +83,7 @@ class CICDTask(DomainModel, table=True):
     __tablename__ = 'cicd_tasks'
     name: str
     pipeline_id: str
-    result: str = Optional[CICDResult]
+    result: Optional[CICDResult]
     status: Optional[CICDStatus]
     type: Optional[CICDType]
     environment: Optional[CICDEnvironment]

Reply via email to