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

Bugbear lint #5768

Merged
merged 7 commits into from Jun 21, 2023
Merged

Bugbear lint #5768

merged 7 commits into from Jun 21, 2023

Conversation

Hoxbro
Copy link
Member

@Hoxbro Hoxbro commented Jun 18, 2023

Updates to codebase with Bugbear running: ruff holoviews --select=B --ignore=B006,B904,B015,B018.

For now, I have not enabled it by default.

Running the command will still give the following errors:

ruff holoviews --select=B --ignore=B006,B904,B015,B018 
holoviews/plotting/util.py:226:17: B007 Loop control variable `v` not used within loop body
holoviews/plotting/util.py:233:21: B007 Loop control variable `v` not used within loop body
holoviews/tests/plotting/matplotlib/test_graphplot.py:209:13: B017 `assertRaises(Exception)` should be considered evil
holoviews/tests/plotting/matplotlib/test_graphplot.py:403:13: B017 `assertRaises(Exception)` should be considered evil
holoviews/util/command.py:60:25: B008 Do not perform function call `OptsMagicProcessor` in argument defaults
holoviews/util/command.py:61:25: B008 Do not perform function call `OutputMagicProcessor` in argument defaults
holoviews/util/command.py:62:25: B008 Do not perform function call `StripMagicsProcessor` in argument defaults
Found 7 errors.

@Hoxbro Hoxbro force-pushed the bugbear_lint branch 2 times, most recently from db79b18 to 3a43cee Compare June 18, 2023 18:51
@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2023

Codecov Report

Merging #5768 (ff4ddd0) into main (14d7d9d) will decrease coverage by 0.01%.
The diff coverage is 94.92%.

@@            Coverage Diff             @@
##             main    #5768      +/-   ##
==========================================
- Coverage   88.18%   88.18%   -0.01%     
==========================================
  Files         306      306              
  Lines       62739    62812      +73     
==========================================
+ Hits        55326    55390      +64     
- Misses       7413     7422       +9     
Impacted Files Coverage Δ
holoviews/plotting/bokeh/annotation.py 85.14% <0.00%> (ø)
holoviews/plotting/bokeh/util.py 66.92% <0.00%> (ø)
holoviews/core/boundingregion.py 62.58% <33.33%> (-0.82%) ⬇️
holoviews/core/data/__init__.py 86.53% <100.00%> (ø)
holoviews/core/data/dask.py 90.00% <100.00%> (ø)
holoviews/core/data/grid.py 86.27% <100.00%> (ø)
holoviews/core/data/spatialpandas.py 87.46% <100.00%> (ø)
holoviews/core/data/util.py 58.92% <100.00%> (ø)
holoviews/core/dimension.py 86.77% <100.00%> (ø)
holoviews/core/options.py 82.53% <100.00%> (+0.10%) ⬆️
... and 32 more

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@maximlt maximlt left a comment

Choose a reason for hiding this comment

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

I didn't know bugbear, for reference this is originally a flake8 plugin that was re-implemented by ruff. Some of the changes made by the tools look dubious to me, I think it's worth reviewing it in details before merging.

holoviews/core/data/util.py Show resolved Hide resolved
holoviews/plotting/plotly/dash.py Outdated Show resolved Hide resolved
holoviews/core/boundingregion.py Show resolved Hide resolved
@Hoxbro Hoxbro merged commit 80880db into main Jun 21, 2023
13 checks passed
@Hoxbro Hoxbro deleted the bugbear_lint branch June 21, 2023 16:11
@Hoxbro Hoxbro mentioned this pull request Jun 22, 2023
@Hoxbro Hoxbro mentioned this pull request Aug 18, 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.

None yet

3 participants