New submission from Aviral Srivastava :
I want to get all the functions and classes in module: `__main__` of the source
code directory: `/tmp/rebound/rebound`.
When I use the `pyclbr.readmodule_ex` API:
```
source_code_data = pyclbr.readmodule_ex(source_code_module,
path=source_code_path
Aviral Srivastava added the comment:
Hey Terry, thanks for commenting. I have a few questions to ask you, please
pardon my lack of awareness.
>This requieres end lines and having it be an attribute is easier and more
>accurate than recalculating it.
How do you recalculate the end_
Aviral Srivastava added the comment:
I have made the changes and tested, my builds were successful. Please review
it?
CC @brandtbucher, @steven.daprano
--
___
Python tracker
<https://bugs.python.org/issue38
Change by Aviral :
--
pull_requests: +23168
pull_request: https://github.com/python/cpython/pull/24348
___
Python tracker
<https://bugs.python.org/issue38
Aviral Srivastava added the comment:
How do I generate the endline no? Initially, I could
do, stack[-1][0].end_lineno = start[0] - 1 but how do I this now given that the
recent changes are operating on the AST instead of the token stream?
--
nosy: +kebab-mai-haddi
Aviral Srivastava added the comment:
But how do I generate the endline no? Initially, I could
do, stack[-1][0].end_lineno = start[0] - 1 but how do I this now?
Best,
Aviral Srivastava
LinkedIn
<https://mailtrack.io/trace/link/c4502b41561cd995471aa8291b55e07212663a68?url=https%3A
New submission from Aviral Srivastava :
I created a PR a year ago, https://github.com/python/cpython/pull/16466/files,
and now the source code is completely changed. How do I create another PR or if
there is another way through which I can get an end line for each object (class
and function
Change by Aviral :
--
keywords: +patch
pull_requests: +16249
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16466
___
Python tracker
<https://bugs.python.org/issu
New submission from Aviral :
Currently, the `readmodule` returns the starting line of the classes but not
the end line. This should be provided as well in order to get the scope of the
class, mainly to help check what all imports were used in a class.
--
components: Library (Lib