Git Product home page Git Product logo

Comments (6)

pylint-bot avatar pylint-bot commented on July 22, 2024

Original comment by Ethan Glasser-Camp (BitBucket: glasserc, GitHub: @glasserc?):


Relatedly, I have another plugin that tries to add instance variables to classes if they're inherited from certain classes. Right now it's impossible to trace their inheritance chains from a register_transform function if those classes are imported using "from module import Class".

from astroid.

pylint-bot avatar pylint-bot commented on July 22, 2024

Original comment by Sylvain Thénault (BitBucket: sthenault, GitHub: @sthenault?):


This used to work but doesn't anymore since you updated your code to the new api?

from astroid.

pylint-bot avatar pylint-bot commented on July 22, 2024

Original comment by Ethan Glasser-Camp (BitBucket: glasserc, GitHub: @glasserc?):


As far as I know, although I haven't tried it since January.

from astroid.

pylint-bot avatar pylint-bot commented on July 22, 2024

Original comment by BitBucket: mdbostwick:


Did anything happen with this? I am using pylint 1.3.1 and astroid 1.2.1, common 0.63.0, that I am getting false positives on flask.ext. and would very much like to resolve those.

from astroid.

pylint-bot avatar pylint-bot commented on July 22, 2024

Original comment by Joe Schafer (BitBucket: jschaf, GitHub: @jschaf?):


I created a pylint-flask plugin that solves this issue in a different way. My code is at https://github.com/jschaf/pylint-flask

Instead of reusing the From node, I just made new ones.

from astroid.

pylint-bot avatar pylint-bot commented on July 22, 2024

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore):


I'm really sorry for the delay, having bugs lurking around for years is not acceptable.

The original problem, the fact that inference wasn't really possible in transforms was fixed in the commit e22bcea38c2cfe9de535819cca3047ce5ad06426, which added a separate step for transforms. The problem with the transforms was that they were running at the same time the AST tree was built, which meant that whenever a transform was doing inference, it was doing inference on a partially constructed tree, with results similar as the one experienced in this issue. Since now the transforms are separated and called after the AST is built, inference is fully possible inside transforms, which means that transforms as the one provided by Ethan are working properly now. The fix will be part of astroid 1.4.

from astroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.