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 codeql warning and web links #74

Merged
merged 3 commits into from
Dec 15, 2022
Merged

Conversation

ericpre
Copy link
Member

@ericpre ericpre commented Dec 14, 2022

Follow up of #72.

Progress of the PR

  • Fix codeql warning in image and jeol plugins,
  • fix weblink,
  • [n/a] add an changelog entry in the upcoming_changes folder (see upcoming_changes/README.rst),
  • [na/] Check formatting changelog entry in the readthedocs doc build of this PR (link in github checks)
  • [n/a] add tests,
  • ready for review.

@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Base: 84.27% // Head: 84.26% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (277cb79) compared to base (34528e1).
Patch coverage: 80.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
- Coverage   84.27%   84.26%   -0.01%     
==========================================
  Files          65       65              
  Lines        8481     8482       +1     
  Branches     1894     1894              
==========================================
  Hits         7147     7147              
- Misses        875      876       +1     
  Partials      459      459              
Impacted Files Coverage Δ
rsciio/tiff/_api.py 88.24% <ø> (ø)
rsciio/image/_api.py 90.80% <66.66%> (-1.06%) ⬇️
rsciio/jeol/_api.py 99.14% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

rsciio/image/_api.py Fixed Show fixed Hide fixed
rsciio/image/_api.py Fixed Show fixed Hide fixed
@@ -179,8 +182,7 @@
if _UREG.Quantity(units).check("1/[length]"):
scalebar_kwds["dimension"] = "si-length-reciprocal"

scalebar = ScaleBar(axis["scale"], units, **scalebar_kwds)
ax.add_artist(scalebar)
ax.add_artist(ScaleBar(axis["scale"], units, **scalebar_kwds))

Check failure

Code scanning / CodeQL

Potentially uninitialized local variable

Local variable 'ScaleBar' may be used before it is initialized.
Copy link
Member Author

Choose a reason for hiding this comment

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

I have dismissed this CodeQL failure for the following reason:
Python is case sensitive: in this case, we have class name (ScaleBar, camel case) which "clashes" with the keyword argument (scalebar, all lower case). We could use an alias for the import of the class name but I don't think that this is worth it.

@ericpre ericpre merged commit 2d768cd into hyperspy:main Dec 15, 2022
@ericpre ericpre deleted the fix_codeql_warning branch February 4, 2023 12:23
@jlaehne jlaehne added this to the v0.1.0 initial release milestone Apr 26, 2023
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.

2 participants