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

Fix tests #2801

Merged
merged 11 commits into from
May 29, 2024
Merged

Fix tests #2801

merged 11 commits into from
May 29, 2024

Conversation

joamatab
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the bug Something isn't working label May 29, 2024
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.

@@ -4,7 +4,6 @@
from gdsfactory import Port


@gf.cell(cache={})
def test_connect_corner(data_regression: DataRegressionFixture, N=6, config="A"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Low code quality found in test_connect_corner - 23% (low-code-quality)


ExplanationThe quality score for this function is below the quality threshold of 25%.
This score is a combination of the method length, cognitive complexity and working memory.

How can you solve this?

It might be worth refactoring this function to make it shorter and more readable.

  • Reduce the function length by extracting pieces of functionality out into
    their own functions. This is the most important thing you can do - ideally a
    function should be less than 10 lines.
  • Reduce nesting, perhaps by introducing guard clauses to return early.
  • Ensure that variables are tightly scoped, so that code using related concepts
    sits together within the function rather than being scattered.

@joamatab joamatab merged commit 91f1904 into main May 29, 2024
4 of 11 checks passed
@joamatab joamatab deleted the fix_tests branch May 29, 2024 22:33
@joamatab joamatab restored the fix_tests branch May 30, 2024 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant