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

warn about no space after an except before a ( #513

Closed
pylint-bot opened this issue Apr 6, 2015 · 1 comment
Closed

warn about no space after an except before a ( #513

pylint-bot opened this issue Apr 6, 2015 · 1 comment
Labels
Checkers Related to a checker Enhancement ✨ Improvement to a component Won't fix/not planned

Comments

@pylint-bot
Copy link

pylint-bot commented Apr 6, 2015

Originally reported by: BitBucket: gpshead, GitHub: @gpshead?


I've seen some code use this, but it is exceedingly rare from what I can tell:

"""Test some style nits vs pylint."""

from __future__ import print_function

try:
    pass
except(IOError, KeyError) as error:
    print(error)

It'd be nice to tell users to always put a space between an except and any following ( in the case of a tuple of exceptions being specified.

In our internal code base I found around ~0.3% of except clauses with a tuple do this (tiny!).

In a bunch of open source code I've grepped over, pandas has one unittest (test_ujson.py) that repeats this pattern, numpy's fft/fftpack.py does it once. It really is not common.


@pylint-bot pylint-bot added Enhancement ✨ Improvement to a component Checkers Related to a checker labels Dec 9, 2015
@cdce8p
Copy link
Member

cdce8p commented Oct 24, 2021

pycodestyle is probably the better place for it. This one seems related: PyCQA/pycodestyle#371
black can also fix it.

@cdce8p cdce8p closed this as completed Oct 24, 2021
msuozzo pushed a commit to msuozzo/pylint that referenced this issue Feb 18, 2022
…dev#513)

* feat: update client libraries to support Database operations

PiperOrigin-RevId: 419710013

Source-Link: googleapis/googleapis@b7c9d05

Source-Link: https://github.com/googleapis/googleapis-gen/commit/ae498279c4e71cd4aa6e0655e92a693df97472c4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWU0OTgyNzljNGU3MWNkNGFhNmUwNjU1ZTkyYTY5M2RmOTc0NzJjNCJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Checkers Related to a checker Enhancement ✨ Improvement to a component Won't fix/not planned
Projects
None yet
Development

No branches or pull requests

2 participants