3

I'm using Syntastic in vim as a linter for Python3. I have a few warnings that my print statements are expressions that are not assigned to anything:

[expression-not-assigned] Expression "(print(('Authenticated for Twitter user ') + (twitter_api.VerifyCredentials().screen_name)), )" is assigned to nothing
[expression-not-assigned] Expression "(print('Deleting Twitter posts.'),     )" is assigned to nothing

These are just simple print statements so I'm curious why I'm seeing these warnings and how I would go about resolving them.

Alex Waibel
  • 103
  • 1
  • 8

1 Answers1

6

Remove the outer parenthesizes and everything should be fine.

print('Authenticated for Twitter user %s' % twitter_api.VerifyCredentials().screen_name)
print('Deleting Twitter posts.')
Dunedan
  • 7,848
  • 6
  • 42
  • 52