RemoveArgument - refactoring produces syntax errors at callsite if original code contains comments
Maintainer thường phản hồi trong vòng 7 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Reproduce with rope 1.8.0 by removing the logger argument from save_list_of_dataframes_to_xlsx using RemoveArgument, on a call site that has comments between the arguments as in the issue. Compare the output with the expected output in the issue, which keeps each argument and comment on its own line without the logger argument. Done means the call site stays valid Python with its comments in place.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When removing an argument from a function, the code at the callsite goes into syntax errors if comments exist at the callsite.
To Reproduce
Steps to reproduce the behavior:
- Code before refactoring:
at the callsite:
save_list_of_dataframes_to_xlsx(list_of_dfs,
folder_path=folder_path,
# filename=self.__class__.__name__, # old (GIANNAM, 2021-10-21, 19:02)
filename=self.xlsx_out_filename, # new (GIANNAM, 2021-10-22, 10:19)
sheetname_list=sheetname_list,
logger=self.logger_obj.logger)
- Describe the refactoring you want to do
remove Argument - logger (on the function definition, not the callsite)
- Expected code after refactoring:
save_list_of_dataframes_to_xlsx(list_of_dfs,
folder_path=folder_path,
# filename=self.__class__.__name__, # old (GIANNAM, 2021-10-21, 19:02)
filename=self.xlsx_out_filename, # new (GIANNAM, 2021-10-22, 10:19)
sheetname_list=sheetname_list)
- Describe the error or unexpected result that you are getting
The code gets compressed into one line with the comments mixed in.
save_list_of_dataframes_to_xlsx(list_of_dfs,folder_path, # filename=self.__class__.__name__, # old (GIANNAM, 2021-10-21, 19=self.xlsx_out_filename, # new (GIANNAM, 2021-10-22, 10=sheetname_list)
Editor information (please complete the following information):
- Project Python version: 3.7.9
- Rope Python version: 3.7.9
- Rope version: 1.8.0
- Text editor/IDE and version: (no editor, using rope as a library)
Additional context
still fantastic library thanks a lot
- Ngôn ngữ chính
- Python
- Star
- 2.2k
- Fork
- 197
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python-rope/rope
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
python-rope/rope#927 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
python-rope/rope#926 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
simplify.real_code blanks t-strings, so renames inside them edit the wrong offsetCó thể đã có người làm @sean0407 đã nhận 10 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
python-rope/rope#913 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
python-rope/rope#925 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
Extract method/variable and introduce parameter don't check whether the new name is already in useĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
python-rope/rope#924 ·
Maintainer thường phản hồi trong vòng 7 ngày
Tất cả issue của python-rope/rope
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
521xueweihan/HelloGitHub#4237 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jejjohnson/gaussx#721 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mock-core-configs/etc/mock/rocky-10-riscv64.cfg contains the wrong architecture in config_opts['root']Có thể đã có người làm @jasonmontleon đã nhận 4 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
rpm-software-management/mock#1834 ·
-
Switch to `container` resource detector in declarative configuration doc after 1.46.0 rebaseĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
elastic/elastic-otel-python#683 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci-rerun: collect.py fails a whole pr-babysit cycle on one transient GitHub 5xx and never retriesĐang mởfollow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày