Skip to content

Refactor Code Expression & Replace unneeded comprehension with generator - #13217

Closed
yezz123 wants to merge 9 commits into
ipython:mainfrom
GDGSNF:master
Closed

yezz123 wants to merge 9 commits into
ipython:mainfrom
GDGSNF:master

Conversation

@yezz123

@yezz123 yezz123 commented Oct 25, 2021

Copy link
Copy Markdown

No description provided.

@Carreau

Carreau commented Oct 25, 2021

Copy link
Copy Markdown
Member

Thanks, I'll review that when I have a bit more time, and try to get that in.

Please try to keep the PRs smaller when you can, touchin 40+ files highly increases the chance that there will be a conflict, and forces reviewers to find long block of time to review the full PR (as mostly the reviewers is just me these days).

Also is that using automating code refactoring ?

In general we also try to avoid refactoring logic for the sake of refactoring logic as this make it harder to find the reasons for something when using git blame. This also affects our ability to automatically backport patches to older branches.

@yezz123

yezz123 commented Oct 25, 2021

Copy link
Copy Markdown
Author

Thanks, I'll review that when I have a bit more time and try to get that in.

Please try to keep the PRs smaller when you can, touching 40+ files highly increases the chance that there will be a conflict, and forces reviewers to find the long block of time to review the full PR (as mostly the reviewers are just me these days).

Also is that using automating code refactoring?

In general we also try to avoid refactoring logic for the sake of refactoring logic as this makes it harder to find the reasons for something when using git blame. This also affects our ability to automatically backport patches to older branches.

Hello, @Carreau thanks for responding to my PR.

Yes, take your time, this pr take for me more than 3 weeks, I use python for a long time that why I try always to understand the magic of code, so I take time to help the community to simplify the code and let the code understood by all users.

Also, the idea about keeping the same logic of code is here cause all the code is just some enhancement and a way to let it more pythonic and human readability at the same time.

So take your time, and read all the changes that i did and we can talk about it.

Comment thread IPython/utils/decorators.py Outdated
out = func(*args,**kw)
wrapper.called = True
return out
return func(*args,**kw)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one will not have the same behavior if func(*args, **kwargs) raises, and it's incorrect from the docstring:

determine if a call to
    func() was attempted and succeeded.

@Carreau

Carreau commented Dec 26, 2021

Copy link
Copy Markdown
Member

I've fixed my comment and tried to rebase on master, but can't push on your branch,

the changes I made are there https://github.com/Carreau/ipython/tree/gmaster, most conflicts are dues to removal in master.

Sorry to took a long time to review, next time having smaller set of changes could ensure they are merged faster.

@yezz123

yezz123 commented Dec 26, 2021

Copy link
Copy Markdown
Author

I've fixed my comment and tried to rebase on master, but can't push on your branch,

the changes I made are there https://github.com/Carreau/ipython/tree/gmaster, most conflicts are dues to removal in master.

Sorry to take a long time to review, next time having a smaller set of changes could ensure they are merged faster.

Great! let me fix that conflict and the change then i will ask for a re-review for the PR 🚀

@Carreau

Carreau commented Dec 26, 2021 via email

Copy link
Copy Markdown
Member

@yezz123

yezz123 commented Mar 15, 2022

Copy link
Copy Markdown
Author

@Carreau Hello is this still active to fix all the conflicts and push to master?

@Carreau

Carreau commented Feb 23, 2025

Copy link
Copy Markdown
Member

Closing old stale PRs, sorry if this was not addressed, but this has been a few years, so there are few chances of someone actually pushing this through.

Feel free to resubmit if you feel this has a chance to be revived.

@Carreau Carreau closed this Feb 23, 2025
@Carreau Carreau added this to the no action milestone Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants