Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

feat(java): add String to java.lang #22

Merged
merged 1 commit into from
Jul 27, 2022
Merged

feat(java): add String to java.lang #22

merged 1 commit into from
Jul 27, 2022

Conversation

cesarcoatl
Copy link
Member

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)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

We are defining and using String variable per module

Issue Number: N/A

What is the new behavior?

Create java.lang.String and import where required

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

refactor all modules where String is used

fix the minimum number of errors reported by `mypy --strict` by adding
type hints and additional supporting classes
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 27, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.07 ⭐ 0.06 ⭐ -0.01 👍
Method Length 12.82 ⭐ 12.57 ⭐ -0.25 👍
Working memory 2.85 ⭐ 2.77 ⭐ -0.08 👍
Quality 96.56% 96.89% 0.33% 👍
Other metrics Before After Change
Lines 9274 9753 479
Changed files Quality Before Quality After Quality Change
src/com/inductiveautomation/factorypmi/application/init.py 99.93% ⭐ 98.42% ⭐ -1.51% 👎
src/com/inductiveautomation/factorypmi/application/script/builtin/init.py 99.66% ⭐ 99.65% ⭐ -0.01% 👎
src/com/inductiveautomation/ignition/common/init.py 99.10% ⭐ 99.23% ⭐ 0.13% 👍
src/com/inductiveautomation/ignition/common/alarming/evaluation/init.py 98.13% ⭐ 99.97% ⭐ 1.84% 👍
src/com/inductiveautomation/ignition/common/alarming/query/init.py 100.00% ⭐ 100.00% ⭐ 0.00%
src/com/inductiveautomation/ignition/common/browsing/init.py 99.95% ⭐ 99.90% ⭐ -0.05% 👎
src/com/inductiveautomation/ignition/common/messages/init.py 99.98% ⭐ 99.98% ⭐ 0.00%
src/com/inductiveautomation/ignition/common/opc/init.py 99.99% ⭐ 99.96% ⭐ -0.03% 👎
src/com/inductiveautomation/ignition/common/script/builtin/init.py 98.88% ⭐ 98.90% ⭐ 0.02% 👍
src/com/inductiveautomation/ignition/common/script/builtin/ialabs/init.py 94.42% ⭐ 95.03% ⭐ 0.61% 👍
src/com/inductiveautomation/ignition/common/user/init.py 98.83% ⭐ 98.25% ⭐ -0.58% 👎
src/com/inductiveautomation/ignition/common/user/schedule/init.py 99.74% ⭐ 99.37% ⭐ -0.37% 👎
src/com/inductiveautomation/ignition/common/util/init.py 100.00% ⭐ 99.50% ⭐ -0.50% 👎
src/java/awt/init.py 99.88% ⭐ 99.85% ⭐ -0.03% 👎
src/java/awt/image/init.py 99.67% ⭐ 99.50% ⭐ -0.17% 👎
src/java/lang/init.py 98.42% ⭐ 98.84% ⭐ 0.42% 👍
src/java/util/init.py 98.41% ⭐ 98.71% ⭐ 0.30% 👍
src/javax/swing/init.py 91.18% ⭐ 94.56% ⭐ 3.38% 👍
src/javax/swing/text/init.py 99.92% ⭐ 99.92% ⭐ 0.00%
src/org/python/core/init.py 99.86% ⭐ 99.86% ⭐ 0.00%
src/system/alarm.py 90.84% ⭐ 91.20% ⭐ 0.36% 👍
src/system/dataset.py 95.08% ⭐ 95.29% ⭐ 0.21% 👍
src/system/date.py 97.95% ⭐ 98.02% ⭐ 0.07% 👍
src/system/db.py 85.92% ⭐ 86.11% ⭐ 0.19% 👍
src/system/device.py 98.96% ⭐ 99.19% ⭐ 0.23% 👍
src/system/dnp3.py 91.91% ⭐ 92.04% ⭐ 0.13% 👍
src/system/eam.py 94.29% ⭐ 94.27% ⭐ -0.02% 👎
src/system/file.py 96.07% ⭐ 96.34% ⭐ 0.27% 👍
src/system/groups.py 97.95% ⭐ 98.14% ⭐ 0.19% 👍
src/system/gui.py 91.34% ⭐ 91.77% ⭐ 0.43% 👍
src/system/nav.py 98.57% ⭐ 98.82% ⭐ 0.25% 👍
src/system/net.py 89.32% ⭐ 89.44% ⭐ 0.12% 👍
src/system/opc.py 96.72% ⭐ 97.11% ⭐ 0.39% 👍
src/system/opchda.py 93.57% ⭐ 93.57% ⭐ 0.00%
src/system/print.py 97.57% ⭐ 98.84% ⭐ 1.27% 👍
src/system/report.py 90.56% ⭐ 90.78% ⭐ 0.22% 👍
src/system/security.py 95.99% ⭐ 96.06% ⭐ 0.07% 👍
src/system/serial.py 84.44% ⭐ 86.55% ⭐ 2.11% 👍
src/system/sfc.py 98.01% ⭐ 98.40% ⭐ 0.39% 👍
src/system/tag.py 91.56% ⭐ 91.54% ⭐ -0.02% 👎
src/system/twilio.py 96.98% ⭐ 97.09% ⭐ 0.11% 👍
src/system/user.py 98.67% ⭐ 98.80% ⭐ 0.13% 👍
src/system/util.py 91.76% ⭐ 91.86% ⭐ 0.10% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
src/system/tag.py queryTagHistory 0 ⭐ 77 🙂 21 ⛔ 59.44% 🙂 Extract out complex expressions
src/system/net.py sendEmail 0 ⭐ 73 🙂 22 ⛔ 59.54% 🙂 Extract out complex expressions
src/system/util.py getProperty 7 ⭐ 74 🙂 11 😞 63.95% 🙂 Extract out complex expressions
src/system/alarm.py queryJournal 0 ⭐ 66 🙂 15 😞 66.09% 🙂 Extract out complex expressions
src/system/tag.py queryTagCalculations 0 ⭐ 52 ⭐ 14 😞 69.55% 🙂 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!

@cesarcoatl cesarcoatl merged commit 0fa0b61 into ignition-api:main Jul 27, 2022
@cesarcoatl cesarcoatl deleted the feat/java.lang.String branch July 27, 2022 20:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant