-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298 from koxudaxi/fix_wrong_call_parameters_when_…
…init_is_defined Fix wrong call parameters when init is defined
- Loading branch information
Showing
9 changed files
with
110 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from pydantic import BaseModel | ||
|
||
|
||
class A(BaseModel): | ||
abc: str = '123' | ||
def __init__(self, xyz: int): | ||
pass | ||
|
||
A().<caret> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from pydantic import BaseModel | ||
|
||
|
||
class A(BaseModel): | ||
abc: str = '123' | ||
def __init__(self, xyz: int): | ||
pass | ||
|
||
A(<caret>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
from pydantic import BaseModel | ||
|
||
|
||
class A(BaseModel): | ||
abc: str = '123' | ||
def __init__(self): | ||
pass | ||
A() | ||
|
||
class B(BaseModel): | ||
abc: str = '123' | ||
def __init__(self, a: float, b: int): | ||
pass | ||
B(abc='123'<warning descr="null">)</warning> | ||
|
||
class C(BaseModel): | ||
abc: str = '123' | ||
def __init__(self, a: float, b: int = 123): | ||
pass | ||
|
||
C(abc='123'<warning descr="null">)</warning> | ||
|
||
|
||
# class D(BaseModel): | ||
# abc: str = '123' | ||
# def __init__(self, *a): | ||
# pass | ||
# | ||
# C(abc='123') | ||
# | ||
# class E(BaseModel): | ||
# abc: str = '123' | ||
# def __init__(self, **a): | ||
# pass | ||
# E(abc='123') | ||
|
||
class F(C): | ||
abc: str = '123' | ||
|
||
def __init__(self, c: float, d: str): | ||
super(F, self).__init__(...) | ||
F(abc='123'<warning descr="null">)</warning> | ||
|
||
class G(C): | ||
abc: str = '123' | ||
|
||
def __new__(self, c: float, d: str): | ||
super(F, self).__init__(...) | ||
G(abc='123') | ||
|
||
|
||
class H(C): | ||
pass | ||
|
||
H(abc='123'<warning descr="null">)</warning> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters