Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix Global and Module MoveRefactoring#1141

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
diraol merged 3 commits intopython-mode:developfromlieryan:fix-move-refactoring
Jun 24, 2023

Conversation

lieryan
Copy link
Contributor

@lieryanlieryan commentedSep 2, 2021
edited
Loading

Global and Module Move refactoring requires thatdest be a rope
module, while Method Move refactoring requires thatdest be an
attribute name.

Previously, Global Move refactoring errors out with

[Pymode]: error: Unhandled exception in Pymode: 'str' object has no attribute 'exists'

And Module Move refactoring errors out with:

[Pymode]: error: Unhandled exception in Pymode: 'str' object has no attribute 'is_folder'

To perform Global Move refactoring:

  1. create a file mod1.py and mod2.py containing
# mod1.pyimport mod2myvar = 1def myfunc():    passclass MyClass:    pass
# mod2.py# just empty
  1. To perform Global Move refactoring, point vim cursor tomyvar/myfunc/MyClass, then press<C-c>rv
  2. When the destination prompt appears, type "mod2" as destination

To perform a Module Move refactoring:

  1. create a file mod1.py and pkg/mod2.py containing
# mod1.pyimport mod2myvar = 1def myfunc():    print(myvar)    print(MyClass)class MyClass:    pass
# pgk/__init__.py# just empty
# mod2.py# just empty
  1. To perform Module Move refactoring, point vim cursor tomod2, then press<C-c>rv
  2. When the destination prompt appears.. Type "pkg" as destination.

Global and Module Move refactoring requires that `dest` be a ropemodule, while Method Move refactoring requires that `dest` be anattribute name.
@lieryanlieryanforce-pushed thefix-move-refactoring branch 2 times, most recently fromc7f3744 tob27b45eCompareSeptember 2, 2021 13:23
@diraoldiraol merged commit71a7f08 intopython-mode:developJun 24, 2023
@lieryanlieryan deleted the fix-move-refactoring branchJune 27, 2023 12:36
@lieryan
Copy link
ContributorAuthor

Thanks for merging this pull request@diraol

@diraol
Copy link
Contributor

Thanks for merging this pull request@diraol

I am so sorry it took me so long, the parenting life is really time consuming!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@diraoldiraoldiraol approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@lieryan@diraol

[8]ページ先頭

©2009-2025 Movatter.jp