Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of attrs/dataclass/pydantic/namedtuple constructors #656

Draft
wants to merge 63 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
bf5716a
Add test
tristanlatr Sep 17, 2022
f7d0d1a
Add src
tristanlatr Sep 17, 2022
d87e745
Structure tests
tristanlatr Sep 18, 2022
f022cdf
wip Class.constructors attribute
tristanlatr Sep 18, 2022
d578d4c
Add extra information with constructor signature that links to the de…
tristanlatr Sep 19, 2022
6f8e806
Introduce the SignatureBuilder class and refactor the astbuilder to u…
tristanlatr Sep 19, 2022
24d5ad6
wip
tristanlatr Sep 27, 2022
379c63e
Fix issues
tristanlatr Oct 31, 2022
a527d97
Merge branch 'master' into 305-handling-of-constructors
tristanlatr Oct 31, 2022
c5fc9b9
try to fix mypy
tristanlatr Oct 31, 2022
c4be1a9
Merge branch 'master' into 305-handling-of-constructors
tristanlatr Jun 5, 2023
a2389dc
Abstract out some of the core visiting code for dataclass like classes
tristanlatr Jun 11, 2023
36e3683
Factor-out callable analysis inside attrs.py into functions in astuti…
tristanlatr Jun 11, 2023
d974015
Fix docstrings
tristanlatr Jun 11, 2023
d1281cf
Update pydoctor/astutils.py
tristanlatr Jun 11, 2023
41d8ddb
Refactors
tristanlatr Jun 11, 2023
bb7c62c
Merge branch '718-dataclass-like-abstraction' of github.com:twisted/p…
tristanlatr Jun 11, 2023
ba47bab
Fix docstring
tristanlatr Jun 11, 2023
1f74226
Merge branch '718-dataclass-like-abstraction' into 305-handling-of-co…
tristanlatr Jun 11, 2023
9b3860b
remove commented code
tristanlatr Jun 11, 2023
a3f0cd3
Remove unused imports
tristanlatr Jun 11, 2023
4822ea9
Fix annotation of signature_from_functiondef()
tristanlatr Jun 11, 2023
3f8c7f6
Improve support for attrs generated classes, still WIP...
tristanlatr Jun 14, 2023
31ef268
Better understand the factory parameter.
tristanlatr Jun 16, 2023
c06de7e
Fix detected regression in overload handling
tristanlatr Jul 6, 2023
2155fec
Improve annotation_from_attrib()
tristanlatr Jul 7, 2023
4b9142e
Better handle multiple dataclass like extensions
tristanlatr Jul 7, 2023
cf8ba4e
Merge branch '718-dataclass-like-abstraction' into 305-handling-of-co…
tristanlatr Jul 7, 2023
f7220e9
Adjust postProcess
tristanlatr Jul 7, 2023
def0ee0
refarctors and add test
tristanlatr Jul 7, 2023
5a1939c
Add support for auto_detect parameter
tristanlatr Jul 7, 2023
411a584
Support inherited constructor params
tristanlatr Jul 7, 2023
5c72350
Fix presentation of constructors of attrs class
tristanlatr Jul 7, 2023
3720604
Fix order of arguments in constructor short text
tristanlatr Jul 7, 2023
299cd58
Fix keyword only feature
tristanlatr Jul 8, 2023
7497b7a
Add support for the new APIs of attrs, fixes #718
tristanlatr Jul 8, 2023
6a33634
Fix/silent mypy warnings and other refactors
tristanlatr Jul 9, 2023
4ce9b97
Add a docstring to attrs generated __init__ methods
tristanlatr Jul 9, 2023
4016b4c
Fix bugs regarding the rendering of constructors
tristanlatr Jul 9, 2023
eb83341
docs
tristanlatr Jul 9, 2023
06e06e1
Merge branch 'master' into 305-handling-of-constructors
tristanlatr Jul 9, 2023
63edbed
Add documentation section on improved attrs support
tristanlatr Jul 9, 2023
1e82784
Add tests
tristanlatr Jul 9, 2023
435ac99
Merge branch '305-handling-of-constructors' of github.com:twisted/pyd…
tristanlatr Jul 10, 2023
bcce4f3
Fix little issue of priorization of presented annotations
tristanlatr Jul 10, 2023
ad9bfef
Fix mypy
tristanlatr Jul 14, 2023
607a89a
add changelog entry
tristanlatr Jul 14, 2023
3e512f4
make it pass the tests on older versions of python as well.
tristanlatr Jul 14, 2023
11ba98c
normal indentation
tristanlatr Jul 14, 2023
83adf80
skip type comment test on python < 3.8
tristanlatr Jul 14, 2023
ce1e05f
minor changes
tristanlatr Jul 14, 2023
34d7bb3
remove unused imports
tristanlatr Jul 18, 2023
fe08559
Merge branch 'master' into 305-handling-of-constructors
tristanlatr Sep 28, 2023
89a58ef
Merge branch 'master' into 305-handling-of-constructors
tristanlatr Sep 28, 2023
d4deb77
Fix merge error
tristanlatr Nov 3, 2023
d81bf62
Merge branch 'master' into 305-handling-of-constructors
tristanlatr Nov 3, 2023
45a5d3a
Merge branch 'master' into 305-handling-of-constructors
tristanlatr Dec 7, 2023
4926d47
Add comments
tristanlatr Jan 3, 2024
2ac31e7
Merge branch '305-handling-of-constructors' of github.com:twisted/pyd…
tristanlatr Jan 3, 2024
b21ad7e
Merge branch 'master' into 305-handling-of-constructors
tristanlatr Jan 17, 2024
417e995
Merge branch 'master' into 305-handling-of-constructors
tristanlatr Feb 10, 2024
a1fff97
WIP- merging dataclass, attrs and other utilities into a single module.
tristanlatr Mar 24, 2024
60c319e
Merge branch '305-handling-of-constructors' of github.com:twisted/pyd…
tristanlatr Mar 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix annotation of signature_from_functiondef()
  • Loading branch information
tristanlatr committed Jun 11, 2023
commit 4822ea9e542bdde7d5c84f3acdf31b8b2ef2a7e1
2 changes: 1 addition & 1 deletion pydoctor/astbuilder.py
Original file line number Diff line number Diff line change
@@ -966,7 +966,7 @@ def __repr__(self) -> str:
return ''.join(node2stan.node2html(self._colorized.to_node(), self._linker))

def signature_from_functiondef(node: Union[ast.AsyncFunctionDef, ast.FunctionDef],
ctx: model.Function) -> Signature:
ctx: model.Function) -> Tuple[Mapping[str, Optional[ast.expr]], Signature]:
# Position-only arguments were introduced in Python 3.8.
posonlyargs: Sequence[ast.arg] = getattr(node.args, 'posonlyargs', ())