Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8573107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:10:32+00:00 2026-06-11T19:10:32+00:00

Pyflakes does not deal very well with the following code: @property def nodes(self): return

  • 0

Pyflakes does not deal very well with the following code:

@property
def nodes(self):
    return self._nodes

@nodes.setter
def nodes(self, nodes):
    """
    set the nodes on this object.
    """
    assert nodes != []  # without nodes no route..

    self.node_names = [node.name for node in nodes]
    self._nodes = nodes

Using vim and syntastic which uses pyflakes I get the following error:

    W806 redefinition of function 'nodes' from line 5

So I get warnings about @nodes.setter because I redefine nodes.

How do I disable this useless warning since this code is correct? Or which python checker deals with this code correctly?

Update

I ran into some problems when I refactored my code because properties and functions have different inheritance behavior. Accessing properties of a base class is different. see:

  • How to call a property of the base class if this property is being overwritten in the derived class?.
  • Python derived class and base class attributes?

so I now tend to avoid this syntax and use proper functions instead.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:10:33+00:00Added an answer on June 11, 2026 at 7:10 pm

    Various fixes that might be released at some point:

    • http://bazaar.launchpad.net/~menesis/pyflakes/pyflakes-mg/revision/38
    • https://github.com/kevinw/pyflakes/pull/12
    • http://bazaar.launchpad.net/~divmod-dev/divmod.org/trunk/revision/2685

    The last seems closest to release, as divmod is the parent project for PyFlakes.

    Other than patching the package yourself, you could always work around the issue:

    @property
    def nodes(self):
        return self._nodes
    
    @nodes.setter
    def _nodes_setter(self, nodes):    # FIXME: pyflakes
        ...
    

    Unfortunately, this will result in pollution of the class namespace.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed pylint doesn't handle well the case of: @property def foo(self): return self._bar.foo
I am using flymake with pyflakes to check my python code and flyspell to
For checking code in python mode I use flymake with pyflakes Also I want
I just recently installed Pyflakes Vim plugin. It works very fine and is very
I'm trying to integrate checking my code using pyflakes into a building process. I've
There are tools like pyflakes and pep8.py, which tell you if the code you
When I run pyflakes on a Zope Filesystem Directory View file (as are found
I am using vim as both Python IDE as well as some markdown editor
I'm trying to use flymake to run pyflakes, as suggested here This works fine
Having trouble getting pyflakes to run on windows. On Windows there is no apt

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.