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

chore(deps-dev): bump flake8-bugbear from 23.1.20 to 23.2.13 #1924

Merged
merged 2 commits into from
Feb 14, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 13, 2023

Bumps flake8-bugbear from 23.1.20 to 23.2.13.

Release notes

Sourced from flake8-bugbear's releases.

23.2.13

  • B906: Add visit_Bytes, visit_Num and visit_Str to the list of visit_* functions that are ignored by the B906 check. The ast.Bytes, ast.Num and ast.Str nodes are all deprecated, but may still be used by some codebases in order to maintain backwards compatibility with Python 3.7.
  • B016: Warn when raising f-strings.
  • Add B028: Check for an explicit stacklevel keyword argument on the warn method from the warnings module.
  • Add B029: Check when trying to use except with an empty tuple i.e. except: ().
  • Add B032: Check for possible unintentional type annotations instead of assignments.
Commits
  • 1d87dc8 Update README + version for 23.2.13 release
  • 76aa16b Add B032: Check for possible unintentional type annotations instead of assign...
  • a7c7ac9 Merge pull request #347 from malthejorgensen/groupby-multiple-usages
  • 4087f49 [pre-commit.ci] pre-commit autoupdate (#348)
  • 05a26c7 Add B031: Warn when using groupby() result multiple times
  • 9ea5a34 Introduce B030; fix crash on weird except handlers (#346)
  • 315f4e7 Split B001 into B029 for empty tuple exception handling (#344)
  • a25fa41 Fix BO28 README typo (#343)
  • e7bbdeb Add a lint checking for warnings.warn stacklevel argument (#342)
  • a2e0c95 B016: Warn when raising f-strings (#341)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from a team as a code owner February 13, 2023 21:03
@dependabot dependabot bot requested review from leandrodamascena and removed request for a team February 13, 2023 21:03
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Feb 13, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 13, 2023
@github-actions github-actions bot added the internal Maintenance changes label Feb 13, 2023
Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 23.1.20 to 23.2.13.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](PyCQA/flake8-bugbear@23.1.20...23.2.13)

---
updated-dependencies:
- dependency-name: flake8-bugbear
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/pip/develop/flake8-bugbear-23.2.13 branch from abb2af6 to 0db75ec Compare February 13, 2023 21:15
@rubenfonseca rubenfonseca self-assigned this Feb 14, 2023
@rubenfonseca
Copy link
Contributor

For reference, this was the error message from the new flake8-bugbear:

B028 No explicit stacklevel keyword argument found. The warn method from the warnings module uses a stacklevel of 1 by default. This will only show a stack trace for the line on which the warn method is called. It is therefore recommended to use a stacklevel of 2 or greater to provide more information to the user.

@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 14, 2023
@sthulb
Copy link
Contributor

sthulb commented Feb 14, 2023

@rubenfonseca want to show examples of before and after?

@rubenfonseca
Copy link
Contributor

@rubenfonseca want to show examples of before and after?

of course!

import sys
import warnings

def print1():
    warnings.warn("this is a warning")

def print2():
    warnings.warn("this is a warning", stacklevel=2)

print1()
print("--", file=sys.stderr)
print2()

Outputs:

/Users/xxx/scratch_1.py:5: UserWarning: this is a warning
  warnings.warn("this is a warning")
--
/Users/xxx/scratch_1.py:12: UserWarning: this is a warning
  print2()

@sthulb sthulb merged commit 18b9b19 into develop Feb 14, 2023
@sthulb sthulb deleted the dependabot/pip/develop/flake8-bugbear-23.2.13 branch February 14, 2023 13:05
@sthulb
Copy link
Contributor

sthulb commented Feb 14, 2023

The second output is much nicer – adds more context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commons dependencies Pull requests that update a dependency file event_handlers internal Maintenance changes metrics python Pull requests that update Python code size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants