Skip to content

Add splinter.Config, deprecate many browser arguments#120

Open
jsfehler wants to merge 1 commit intomasterfrom
config_object
Open

Add splinter.Config, deprecate many browser arguments#120
jsfehler wants to merge 1 commit intomasterfrom
config_object

Conversation

@jsfehler
Copy link
Copy Markdown
Owner

No description provided.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Jan 20, 2023

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.07%.

Quality metrics Before After Change
Complexity 3.43 ⭐ 3.27 ⭐ -0.16 👍
Method Length 37.97 ⭐ 39.51 ⭐ 1.54 👎
Working memory 5.91 ⭐ 5.98 ⭐ 0.07 👎
Quality 80.91% 80.84% -0.07% 👎
Other metrics Before After Change
Lines 1685 1792 107
Changed files Quality Before Quality After Quality Change
splinter/__init__.py % 96.84% ⭐ %
splinter/browser.py 63.23% 🙂 61.54% 🙂 -1.69% 👎
splinter/driver/djangoclient.py 83.56% ⭐ 83.40% ⭐ -0.16% 👎
splinter/driver/flaskclient.py 76.16% ⭐ 75.94% ⭐ -0.22% 👎
splinter/driver/lxmldriver.py 82.88% ⭐ 82.73% ⭐ -0.15% 👎
splinter/driver/zopetestbrowser.py 88.25% ⭐ 88.11% ⭐ -0.14% 👎
splinter/driver/webdriver/chrome.py 52.28% 🙂 50.96% 🙂 -1.32% 👎
splinter/driver/webdriver/edge.py 48.39% 😞 47.41% 😞 -0.98% 👎
splinter/driver/webdriver/firefox.py 31.79% 😞 33.49% 😞 1.70% 👍
splinter/driver/webdriver/remote.py 76.38% ⭐ 47.97% 😞 -28.41% 👎
tests/base.py 90.26% ⭐ 90.33% ⭐ 0.07% 👍
tests/get_browser.py 43.80% 😞 40.51% 😞 -3.29% 👎
tests/test_webdriver.py 80.56% ⭐ 81.87% ⭐ 1.31% 👍
tests/test_webdriver_firefox.py 88.93% ⭐ 88.55% ⭐ -0.38% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
splinter/driver/webdriver/firefox.py WebDriver.__init__ 15 🙂 212 ⛔ 17 ⛔ 33.49% 😞 Try splitting into smaller methods. Extract out complex expressions
tests/get_browser.py get_browser 14 🙂 205 ⛔ 16 ⛔ 35.81% 😞 Try splitting into smaller methods. Extract out complex expressions
splinter/driver/lxmldriver.py LxmlDriver.fill_form 24 😞 149 😞 9 🙂 44.52% 😞 Refactor to reduce nesting. Try splitting into smaller methods
splinter/driver/webdriver/remote.py WebDriver.__init__ 9 🙂 182 😞 13 😞 45.87% 😞 Try splitting into smaller methods. Extract out complex expressions
splinter/driver/flaskclient.py FlaskClient._do_method 10 🙂 183 😞 12 😞 46.43% 😞 Try splitting into smaller methods. Extract out complex expressions

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant