You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Check failure on line 813 in lib/matplotlib/legend_handler.py
View workflow job for this annotation
GitHub Actions/ ruff
[rdjson] reported by reviewdog 🐶Blank line contains whitespaceRaw Output:message:"Blank line contains whitespace" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/legend_handler.py" range:{start:{line:813 column:1} end:{line:813 column:5}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"W293" url:"https://docs.astral.sh/ruff/rules/blank-line-with-whitespace"} suggestions:{range:{start:{line:813 column:1} end:{line:813 column:5}}}
from matplotlib.legend_handler import HandlerPatchCollection
Check failure on line 814 in lib/matplotlib/legend_handler.py
View workflow job for this annotation
GitHub Actions/ ruff
[rdjson] reported by reviewdog 🐶Module level import not at top of fileRaw Output:message:"Module level import not at top of file" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/legend_handler.py" range:{start:{line:814 column:1} end:{line:814 column:61}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"E402" url:"https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file"}
Check warning on line 814 in lib/matplotlib/legend_handler.py
Check failure on line 816 in lib/matplotlib/legend_handler.py
View workflow job for this annotation
GitHub Actions/ ruff
[rdjson] reported by reviewdog 🐶Undefined name `_default_handler_map`Raw Output:message:"Undefined name `_default_handler_map`" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/legend_handler.py" range:{start:{line:816 column:1} end:{line:816 column:21}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"F821" url:"https://docs.astral.sh/ruff/rules/undefined-name"}
Check failure on line 816 in lib/matplotlib/legend_handler.py
View workflow job for this annotation
GitHub Actions/ ruff
[rdjson] reported by reviewdog 🐶Undefined name `PatchCollection`Raw Output:message:"Undefined name `PatchCollection`" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/legend_handler.py" range:{start:{line:816 column:22} end:{line:816 column:37}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"F821" url:"https://docs.astral.sh/ruff/rules/undefined-name"}
Check warning on line 816 in lib/matplotlib/legend_handler.py
View check run for this annotation
Codecov/ codecov/patch
lib/matplotlib/legend_handler.py#L816
Added line #L816 was not covered by tests
from matplotlib.patches import Patch
Check failure on line 819 in lib/matplotlib/legend_handler.py
View workflow job for this annotation
GitHub Actions/ ruff
[rdjson] reported by reviewdog 🐶Module level import not at top of fileRaw Output:message:"Module level import not at top of file" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/legend_handler.py" range:{start:{line:819 column:1} end:{line:819 column:37}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"E402" url:"https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file"}
from matplotlib.collections import PatchCollection
Check failure on line 820 in lib/matplotlib/legend_handler.py
View workflow job for this annotation
GitHub Actions/ ruff
[rdjson] reported by reviewdog 🐶Module level import not at top of fileRaw Output:message:"Module level import not at top of file" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/legend_handler.py" range:{start:{line:820 column:1} end:{line:820 column:51}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"E402" url:"https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file"}
Check failure on line 820 in lib/matplotlib/legend_handler.py
View workflow job for this annotation
GitHub Actions/ ruff
[rdjson] reported by reviewdog 🐶`matplotlib.collections.PatchCollection` imported but unusedRaw Output:message:"`matplotlib.collections.PatchCollection` imported but unused" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/legend_handler.py" range:{start:{line:820 column:36} end:{line:820 column:51}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"F401" url:"https://docs.astral.sh/ruff/rules/unused-import"} suggestions:{range:{start:{line:820 column:1} end:{line:821 column:1}}}
Check warning on line 820 in lib/matplotlib/legend_handler.py
View check run for this annotation
Codecov/ codecov/patch
lib/matplotlib/legend_handler.py#L819-L820
Added lines #L819 - L820 were not covered by tests
class HandlerPatchCollection(HandlerPatch):
Check failure on line 822 in lib/matplotlib/legend_handler.py
View workflow job for this annotation
GitHub Actions/ ruff
[rdjson] reported by reviewdog 🐶Expected 2 blank lines, found 1Raw Output:message:"Expected 2 blank lines, found 1" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/legend_handler.py" range:{start:{line:822 column:1} end:{line:822 column:6}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"E302" url:"https://docs.astral.sh/ruff/rules/blank-lines-top-level"} suggestions:{range:{start:{line:821 column:1} end:{line:822 column:1}} text:"\n\n"}
Check warning on line 822 in lib/matplotlib/legend_handler.py
View check run for this annotation
Codecov/ codecov/patch
lib/matplotlib/legend_handler.py#L822
Added line #L822 was not covered by tests
"""
Handler for PatchCollection, e.g. from matplotlib.collections.
Uses the properties of the first patch in the collection.
"""
def create_artists(self, legend, orig_handle,
Check warning on line 828 in lib/matplotlib/legend_handler.py
Check warning on line 830 in lib/matplotlib/legend_handler.py
View check run for this annotation
Codecov/ codecov/patch
lib/matplotlib/legend_handler.py#L830
Added line #L830 was not covered by tests
try:
fc = orig_handle.get_facecolor()[0]
ec = orig_handle.get_edgecolor()[0]
lw = orig_handle.get_linewidths()[0]
ls = orig_handle.get_linestyle()[0]
except IndexError:
fc, ec, lw, ls = 'gray', 'black', 1.0, 'solid'
Check warning on line 838 in lib/matplotlib/legend_handler.py
View check run for this annotation
Codecov/ codecov/patch
lib/matplotlib/legend_handler.py#L832-L838
Added lines #L832 - L838 were not covered by tests
p.set_facecolor(fc)
p.set_edgecolor(ec)
p.set_linewidth(lw)
p.set_linestyle(ls)
Check warning on line 843 in lib/matplotlib/legend_handler.py
View check run for this annotation
Codecov/ codecov/patch
lib/matplotlib/legend_handler.py#L840-L843
Added lines #L840 - L843 were not covered by tests
self.update_prop(p, orig_handle, legend)
p.set_transform(trans)
p.set_xy([[-xdescent, -ydescent],
Check warning on line 847 in lib/matplotlib/legend_handler.py
View check run for this annotation
Codecov/ codecov/patch
lib/matplotlib/legend_handler.py#L845-L847
Added lines #L845 - L847 were not covered by tests
[-xdescent + width, -ydescent],
[-xdescent + width, -ydescent + height],
[-xdescent, -ydescent + height]])
return [p]
Check failure on line 851 in lib/matplotlib/legend_handler.py
View workflow job for this annotation
GitHub Actions/ ruff
[rdjson] reported by reviewdog 🐶No newline at end of fileRaw Output:message:"No newline at end of file" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/legend_handler.py" range:{start:{line:851 column:19} end:{line:851 column:19}}} source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"W292" url:"https://docs.astral.sh/ruff/rules/missing-newline-at-end-of-file"} suggestions:{range:{start:{line:851 column:19} end:{line:851 column:19}} text:"\n"}
Check warning on line 851 in lib/matplotlib/legend_handler.py
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.