-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
getting "AttributeError: 'NoneType' object has no attribute 'statement'" for small piece of code #2526
Closed
wdv4758h opened this issue
Sep 28, 2018
· 2 comments
· Fixed by rhaamo/ahrl#53, dcollinsn/judgeapps-dependencies#84, python-trio/trio#789, Chromadream/instiz#5 or rkpop/twitter-bot#8
Closed
getting "AttributeError: 'NoneType' object has no attribute 'statement'" for small piece of code #2526
wdv4758h opened this issue
Sep 28, 2018
· 2 comments
· Fixed by rhaamo/ahrl#53, dcollinsn/judgeapps-dependencies#84, python-trio/trio#789, Chromadream/instiz#5 or rkpop/twitter-bot#8
Comments
This is fixed in astroid's master, thanks for creating an issue! |
wow, that's fast We just discover this issue with our company codebase today 😛 |
This was referenced Nov 26, 2018
clrpackages
pushed a commit
to clearlinux-pkgs/astroid
that referenced
this issue
Nov 26, 2018
…result result of a class with an uninferable ``__call__`` method. Christoph Reiter (1): brain_gi: use Exception as a base class for classes inheriting from Exception Claudiu Popa (53): Add support for `argparse.Namespace` Simplify the code now that every class is newstyle class `async` functions are now inferred as `AsyncGenerator` when inferring their call result. Update the PR template to be more user friendly Filter out ``Uninferable`` when inferring the call result result of a class with an uninferable ``__call__`` method. Mark this release as a dev release. Close #608 Disable lint error Add digest_size parameter to hashlib.blake2b and blake2s Correct line numbering for f-strings for complex embedded expressions Remove test depending on mechanize, we'll most likely not install every library we have brain tips for Use skipif instead of the missing skipunless and remove test for pygtk pytest why are you being so weird? add missing reason keyword argument Pass parameters by keyword name when inferring sequences. ``threading.Lock.acquire`` has the ``timeout`` parameter now. unused-variable is now unused-import wildcard-import is no longer emitted on __init__ files Switch to latest pylint's from Github Remove the absolute to relative path transform for coverage, which is no longer needed as tests are not installed with the package anymore Use the correct coverage file and make sure to delete the correct coverage file Use --append and drop the use of .envname Rename asspath to assign_path to be more indicative of what it actually means Add the pre-commit hook Initial formatting of astroid Add black step in tox.ini and Travis, as well as the badge Switch to stages for travis jobs Change the line endings of the pylint config file Let formatting be handled by black Use copy_context where it makes sense Simplify the creation of extra_context for _infer_call Remove the restore_path() method Replace copy.copy() with a simple set() call Replace checks against None and Uninferable to boolean checks Replace a nested for loop with itertools.product Remove unneeded comment Use a generator expression for _multiply_seq_by_int Use itertools.chain to join multiple generators together Remove some unneeded comments and use yield from Use None as a sentinel Add some caching to the transforms and skip non nodes in visit_generic Use generators for string joining instead of creating temporary lists Cache the result of get_assign_nodes Remove Python 2 branches YES is gone, we're using Uninferable for quite some time now Use yield from Update some leftover docstrings Lose an indentation level in ancestors() by continuing if recursing wasn't passed Disable useless-supression for now Replace a nested for loop with a product() call Pass a parent in raw_building when building a new Function or Class Reuse the cls variable inferred earlier Revert "Pass a parent in raw_building when building a new Function or Class" Don't call inference in the functools transform Prepare 2.1.0 Daniel Martin (1): Multiple "value" or "slice" values on subscript inference. David Poirier (1): fix hashlib.blake2* signatures HQupgradeHQ (1): text Jeff Widman (1): Fix typo Serhiy Storchaka (1): Reflect AST changes in Python 3.8. wgehalo (1): Add blake2s to hashing algorithims. What's New in astroid 2.1.0? ============================ Release Date: 2018-11-25 * ``threading.Lock.acquire`` has the ``timeout`` parameter now. Close pylint-dev/pylint#2457 * Pass parameters by keyword name when inferring sequences. Close pylint-dev/pylint#2526 * Correct line numbering for f-strings for complex embedded expressions When a f-string contained a complex expression, such as an attribute access, (NEWS truncated at 15 lines)
This was referenced Nov 28, 2018
This was referenced Dec 20, 2018
This was referenced Feb 12, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
I have strip the code to make it easier to reproduce.
Current behavior
pylint crash in an exception
Expected behavior
At least don't have exception
pylint --version output
tested with current master
20694325dde16377dd5e295ccdd82dffa68ce7aa
and serveral stable releasesThe text was updated successfully, but these errors were encountered: