Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • extensions extensions
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 77
    • Issues 77
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Inkscape
  • extensionsextensions
  • Merge requests
  • !423

Remove circular dependencies

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jonathan Neuhauser requested to merge joneuhauser/extensions:remove-circular-dependencies into master Feb 07, 2022
  • Overview 11
  • Commits 5
  • Pipelines 5
  • Changes 19

What does the merge request do?

Remove some circular dependencies from Inkex, and remove the corresponding non-toplevel imports.

The only remaining non-toplevel import from within Inkex is between elements._base and elements._polygons due to ShapeElement.to_path_element, which creates a PathElement, which derives from ShapeElement. No idea how to fix this except moving both classes into one file.

Also some non-toplevel imports of tween remain, which was discussed below.

Implementation notes

  • There are now interfaces for BaseElement and SvgDocumentElement so when only used for isinstance, not the entire module is needed
  • Some utilities have been moved into their own modules (deprecated_meta, svg_parser, css)
  • The most problematic module was tween because it imported a lot of elements, but the elements also imported tween to define an interpolate method. This will be deprecated at some point after 1.2 since using tween directly is a one-liner as well.

Summary for release notes

Code cleanups.

Checklist

  • Add unit tests (if applicable)
  • Changes to inkex/ are well documented
  • Clean merge request history
Edited Feb 08, 2022 by Jonathan Neuhauser
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: remove-circular-dependencies