Skip to content
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

Remove Unused Imports #357

Merged
merged 1 commit into from Jul 5, 2020
Merged

Remove Unused Imports #357

merged 1 commit into from Jul 5, 2020

Conversation

danyeaw
Copy link
Member

@danyeaw danyeaw commented Jul 4, 2020

Signed-off-by: Dan Yeaw dan@yeaw.me

This PR removes unused imports and enables the unused import check with flake8.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Signed-off-by: Dan Yeaw <dan@yeaw.me>
@github-actions github-actions bot added the chore Maintenance related PR label Jul 4, 2020
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 4, 2020

Sourcery Code Quality Report (beta)

Merging this PR leaves code quality unchanged.

Before After Change
Quality 8.95 8.95 0.0
Complexity 1.33 1.33 0.0
Method Length 39.26 39.12 -0.13
Lines 4670 4634 -36
Changed files Quality Before Quality After Quality Change
gaphor/SysML/modelinglanguage.py 9.71 9.72 0.01 ⬆️
gaphor/SysML/blocks/block.py 8.24 8.23 -0.0
gaphor/SysML/blocks/connectors.py 9.34 9.34 0.0
gaphor/SysML/blocks/proxyport.py 9.17 9.17 0.0
gaphor/SysML/requirements/connectors.py 9.31 9.32 0.01 ⬆️
gaphor/SysML/requirements/requirement.py 7.68 7.68 -0.01 ⬇️
gaphor/SysML/tests/fixtures.py 9.56 9.56 0.0
gaphor/UML/iconname.py 9.51 9.52 0.01 ⬆️
gaphor/UML/umloverrides.py 9.2 9.2 0.0
gaphor/UML/classes/association.py 8.71 8.71 0.0
gaphor/UML/classes/tests/test_interfaceconnect.py 8.97 8.98 0.01 ⬆️
gaphor/UML/components/artifact.py 8.26 8.26 0.0
gaphor/UML/interactions/tests/test_executionspecification.py 8.84 8.85 0.0
gaphor/codegen/tests/test_profile_coder.py 9.0 9.0 0.0
gaphor/core/eventmanager.py 9.51 9.52 0.01 ⬆️
gaphor/core/modeling/elementdispatcher.py 8.11 8.12 0.0
gaphor/core/modeling/listmixins.py 9.23 9.23 0.0
gaphor/core/modeling/presentation.py 9.53 9.54 0.0
gaphor/core/styling/tests/test_css.py 9.46 9.47 0.01 ⬆️
gaphor/diagram/diagramtoolbox.py 8.66 8.71 0.05 ⬆️
gaphor/diagram/presentation.py 8.91 8.92 0.0
gaphor/diagram/propertypages.py 9.28 9.28 0.0
gaphor/diagram/shapes.py 8.74 8.75 0.01 ⬆️
gaphor/diagram/general/simpleitem.py 9.12 9.12 0.01 ⬆️
gaphor/diagram/tests/test_presentation.py 8.98 8.98 0.0
gaphor/diagram/tests/test_style.py 9.16 9.16 0.01 ⬆️
gaphor/ui/elementeditor.py 9.04 9.04 0.0
gaphor/ui/namespace.py 8.2 8.2 0.0
tests/test_undo.py 9.04 9.06 0.02 ⬆️

Here are some functions in these files that still need a tune-up:

File Function Quality Recommendation
gaphor/UML/classes/association.py AssociationEnd.post_update 3.72 Split out functionality
gaphor/ui/namespace.py Namespace.construct 4.3 Split out functionality
gaphor/UML/classes/association.py AssociationItem.post_update 4.72 Split out functionality
gaphor/ui/namespace.py NamespaceView.on_drag_data_received 4.75 Split out functionality
gaphor/SysML/blocks/block.py BlockItem.update_shapes 5.62 Split out functionality

Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it via email or our Gitter!

@danyeaw danyeaw requested a review from amolenaar July 4, 2020 20:12
@danyeaw danyeaw added this to the 2.0 milestone Jul 4, 2020
@amolenaar
Copy link
Member

Sweet!

@amolenaar amolenaar merged commit 6db39e6 into master Jul 5, 2020
@amolenaar amolenaar deleted the chore/unused-imports branch July 5, 2020 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants