-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] gh-113299: Split clinic.py into sub-files #113300
Conversation
* Create Tools/clinic/clinic/ package * Add Tools/clinic/clinic/__init__.py: export names, most of them are used by tests. * Use vars(module) instead of globals() to get symbols. * Move header (author, license) to clinic/__init__.py. * Add run_clinic.py script in Tools/clinic/. Update "make clinic" and "make clinic-tests" in Makefile.pre.in to use run_clinic.py.
Current files sorted by their number of lines:
There are 4 files with at least 500 lines:
Maybe small files (under 200 lines) should be merged into larger files?
|
This PR is a draft to discuss the idea of splitting I didn't try to fix mypy, I don't think that it's worth it at this point. If we split |
TODO:
|
As I discussed: before #113160 will be landed soon. You may also need to reflect the change once the PR is merged. |
Can we remain the name of |
|
We can just use 1-depth policy like case_generator, why do we have to use 2-depths? |
As written, I will handle merge conflicts later. This PR is a draft to discuss the design of such split.
Git doesn't store renamed files. It only stores "add" and "remove" operations. Most Git commands (such as git blame and git log) use an heuristic to detect file renames. Example of my
I don't think that it works well to have a |
About git history: |
Let's discuss the strategy on the issue and implementation details for a specific PR on that specific PR. |
I created a concrete draft PR to see how the code can look like once the big clinic.py is splitted into sub-files. I didn't intent to merge it as it is. I close the PR to make it more obvious :-) |
Tools/clinic/clinic/
packageTools/clinic/clinic/__init__.py
: export names, most of them are used by tests.clinic/__init__.py
.Tools/clinic/
. Update "make clinic" and "make clinic-tests" in Makefile.pre.in to userun_clinic.py
.