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

Add CSS function completion provider #1976

Merged
merged 3 commits into from Jan 4, 2023
Merged

Add CSS function completion provider #1976

merged 3 commits into from Jan 4, 2023

Conversation

vanillajonathan
Copy link
Contributor

@vanillajonathan vanillajonathan commented Dec 30, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • 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

I accidentally messed up #1951 when I tried to rebase it around the changes in the main branch.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 30, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.32%.

Quality metrics Before After Change
Complexity 2.46 ⭐ 2.29 ⭐ -0.17 👍
Method Length 50.17 ⭐ 48.55 ⭐ -1.62 👍
Working memory 4.61 ⭐ 4.57 ⭐ -0.04 👍
Quality 80.64% 80.96% 0.32% 👍
Other metrics Before After Change
Lines 366 431 65
Changed files Quality Before Quality After Quality Change
gaphor/ui/csscompletion.py 82.73% ⭐ 82.37% ⭐ -0.36% 👎
gaphor/ui/elementeditor.py 80.07% ⭐ 80.21% ⭐ 0.14% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
gaphor/ui/elementeditor.py EditorStack.show_no_item_selected 4 ⭐ 131 😞 67.00% 🙂 Try splitting into smaller methods
gaphor/ui/csscompletion.py CssFunctionCompletionProvider.do_refilter 4 ⭐ 74 🙂 10 😞 68.77% 🙂 Extract out complex expressions
gaphor/ui/csscompletion.py CssPropertyCompletionProvider.do_refilter 4 ⭐ 74 🙂 10 😞 68.77% 🙂 Extract out complex expressions
gaphor/ui/elementeditor.py PreferencesStack.open 2 ⭐ 124 😞 6 ⭐ 72.97% 🙂 Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


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!

Help us improve this quality report!

@github-actions github-actions bot added the python Pull requests that update Python code label Dec 30, 2022
@amolenaar
Copy link
Member

Nice! Thanks @vanillajonathan!

@amolenaar amolenaar merged commit b70beed into gaphor:main Jan 4, 2023
@vanillajonathan vanillajonathan deleted the patch-1 branch January 5, 2023 12:59
@danyeaw danyeaw added the feature A new feature label Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants