-
Couldn't load subscription status.
- Fork 21
chore: Remove duplicate reference to process hook #51
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
base: master
Are you sure you want to change the base?
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideCentralize and simplify the import processing hook by removing duplicate logic in the restore method, updating the custom_process_hook signature to always accept plugin data, and adjusting tests to match the new signature. Class diagram for updated import processing hook logicclassDiagram
class PluginRestorer {
+restore(placeholder, language, parent=None)
-data
}
class custom_process_hook {
+custom_process_hook(transfer_hook, plugin, plugin_data)
}
PluginRestorer --> custom_process_hook: uses
Flow diagram for centralized import processing hookflowchart TD
A["restore() in PluginRestorer"] --> B["custom_process_hook('DJANGOCMS_TRANSFER_PROCESS_IMPORT_PLUGIN_DATA', plugin, data)"]
B --> C["User-defined import processor function called with (plugin, data)"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #51 +/- ##
==========================================
+ Coverage 58.43% 58.82% +0.38%
==========================================
Files 10 10
Lines 409 391 -18
Branches 58 56 -2
==========================================
- Hits 239 230 -9
+ Misses 156 148 -8
+ Partials 14 13 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
ca9c318736bfa5345a3e7 introduces an import processor which
has already been defined. This PR removes the duplicate and extends the custom hook to work as described
in the docs.
Related resources
Checklist
masterDiscord to find a “pr review buddy” who is going to review my pull request.
Summary by Sourcery
Consolidate and simplify the plugin import processing by removing duplicate helper methods and always using the unified custom_process_hook interface with explicit plugin_data parameter, and update tests accordingly.
Enhancements:
Tests: