Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bpo-36853: Fix suspicious.py to actually print the unused rules #13579

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

Merged
merged 2 commits into from
Sep 2, 2019

Conversation

asottile
Copy link
Contributor

@asottile asottile commented May 26, 2019

There were two issues here:

  • self.warn isn't a thing in modern sphinx
  • logger.warning terminates immediately and then doesn't print the info lines below it

https://bugs.python.org/issue36853

Copy link
Member

@tirkarthi tirkarthi left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@tirkarthi
Copy link
Member

@JulienPalard Would be helpful to have a review of this. This fixes the error reported in https://bugs.python.org/issue36853. Thanks.

@asottile asottile changed the title Fix suspicious.py to actually print the unused rules bpo-36853: Fix suspicious.py to actually print the unused rules Jun 9, 2019
@drj11
Copy link
Contributor

drj11 commented Jun 11, 2019

Ah, cool. I came here (independently) to report this bug, but found this PR that fixes it instead. :)

@asottile asottile force-pushed the fix_unused_warning branch from c8f36d1 to f8391f7 Compare June 25, 2019 22:27
@asottile
Copy link
Contributor Author

seems @zooba also applied a similar patch, but used the deprecated logger.warn method

I've rebased this to resolve the conflicts

@asottile
Copy link
Contributor Author

In 60419a7

@asottile
Copy link
Contributor Author

asottile commented Jul 6, 2019

@jaraco anything left to do here?

@ned-deily
Copy link
Member

This PR seems to have stalled. @JulienPalard, can you take a look please?

@jaraco
Copy link
Member

jaraco commented Sep 2, 2019

Right. No need to leave this to languish longer.

@jaraco jaraco merged commit e1786b5 into python:master Sep 2, 2019
@bedevere-bot
Copy link

@jaraco: Please replace # with GH- in the commit message next time. Thanks!

@miss-islington
Copy link
Contributor

Thanks @asottile for the PR, and @jaraco for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 2, 2019
…onGH-13579)

* Fix suspicious.py to actually print the unused rules

* Fix the other `self.warn` calls
(cherry picked from commit e1786b5)

Co-authored-by: Anthony Sottile <[email protected]>
@bedevere-bot
Copy link

GH-15649 is a backport of this pull request to the 3.8 branch.

@miss-islington
Copy link
Contributor

Sorry, @asottile and @jaraco, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker e1786b54162e2bfb01ca5aafa19d596c4af5a803 3.7

jaraco pushed a commit that referenced this pull request Sep 2, 2019
…3579) (GH-15649)

* Fix suspicious.py to actually print the unused rules

* Fix the other `self.warn` calls
(cherry picked from commit e1786b5)

Co-authored-by: Anthony Sottile <[email protected]>
@jaraco
Copy link
Member

jaraco commented Sep 2, 2019

@asottile Would you be willing to look at the cherry-pick? Thanks.

@asottile
Copy link
Contributor Author

asottile commented Sep 2, 2019

yep! will do

@asottile asottile deleted the fix_unused_warning branch September 2, 2019 17:31
@bedevere-bot
Copy link

GH-15653 is a backport of this pull request to the 3.7 branch.

jaraco pushed a commit that referenced this pull request Sep 2, 2019
…) (#15653)

* Fix suspicious.py to actually print the unused rules

* Fix the other `self.warn` calls

(cherry picked from commit e1786b5)
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
…on#13579)

* Fix suspicious.py to actually print the unused rules

* Fix the other `self.warn` calls
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
…on#13579)

* Fix suspicious.py to actually print the unused rules

* Fix the other `self.warn` calls
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
…on#13579)

* Fix suspicious.py to actually print the unused rules

* Fix the other `self.warn` calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants