Skip to content

Fixed #28 -- relaxed E301 for nested definitions - #232

Closed
chrismedrela wants to merge 1 commit into
PyCQA:masterfrom
chrismedrela:issue28
Closed

Fixed #28 -- relaxed E301 for nested definitions#232
chrismedrela wants to merge 1 commit into
PyCQA:masterfrom
chrismedrela:issue28

Conversation

@chrismedrela

Copy link
Copy Markdown

No description provided.

@gward gward mentioned this pull request Nov 24, 2013
@IanLee1521 IanLee1521 self-assigned this Dec 30, 2014
@memeplex

Copy link
Copy Markdown
Contributor

Are you still interested in merging this one? In that case I will resolve the conficts.

Comment thread pep8.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This isn't actually perfect. Take for example:

# pkg/compat.py
"""Compat module for <library>."""
import collections

try:
    from collections import OrderedDict
except ImportError:
    class OrderedDict(collections.MutableMapping):
        # ...

try:
    from urlparse import urlparse
except ImportError:
    from urllib.parse import urlparse
# pkg/something.py
from .compat import OrderedDict
#...

That's a global class and that line does not start with class instead it starts with class.

@sigmavirus24

Copy link
Copy Markdown
Member

FWIW, I agree with Florent that the checks shouldn't necessarily be relaxed but should instead be a separate error code. It gives users a lot more flexibility in how they configure pep8

@asottile

Copy link
Copy Markdown
Member

#555 superseded this

@asottile asottile closed this Apr 28, 2020
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.

5 participants