I was absent for the last few days. Regarding async def problem, I believe 
that would be an easy fix/addition. I know that at-others some times can be 
at the zero indentation and most of the children have extra indentation. 
This is supposed to happen only if indenting at-others would lead to the 
indentation of under-indented comments and therefore would cause the 
difference between the source code and the code outline would produce. This 
was intentional. I will check to see why those files have this problem, and 
if it is caused by under indented comments I would rather let user manually 
fix this indentation problem. The next time the file is imported it would 
have usual form (indented at-others and not indented children). However, 
this might also be a matter of setting/preference too.

I'll investigate further and will report my findings later.

Vitalije
On Thursday, December 9, 2021 at 1:31:14 PM UTC+1 Edward K. Ream wrote:

> These bugs affect only the quality of the imported nodes. The files are 
> imported correctly.
>
> 1. In some (rare?) cases, the @others of a class node is not indented. All 
> child nodes contain the leading whitespace that should have preceded the 
> @others.
>
> This bug affects all classes in 
> mypy/test-data/stdlib-samples/3.2/test/test_textwrap.py except the first 
> class.
>
> 2. It appears that "async def" is not recognized as the start of a 
> function.
>
> See mypy/test-data/samples/crawl2.py.  A "...some declarations" node 
> contains async def get_connection. There are many other examples.
>
> 3. Imo, "...some declarations" nodes should be merged into their following 
> or preceding sibling, if such a sibling exists. In my experience, it's 
> better to prefer the *following *sibling if both siblings exist.
>
> That's all for now. 
>
> Edward
>
> P.S. I shall soon add "@bool put-class-in-imported-headlines = True" to 
> leoSettings.leo, so that the python importer will put 'class' in the 
> headlines of class nodes. The "True" value conforms to legacy operation.
>
> EKR
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/42de170d-4d9b-440c-9f76-04553823e078n%40googlegroups.com.

Reply via email to