Skip to content
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

"twistedchecker twisted" emits a traceback #137

Open
glyph opened this issue Apr 8, 2019 · 1 comment
Open

"twistedchecker twisted" emits a traceback #137

glyph opened this issue Apr 8, 2019 · 1 comment

Comments

@glyph
Copy link
Member

glyph commented Apr 8, 2019

Every build of Twisted does this.

Traceback (most recent call last):
  File ".../bin/twistedchecker", line 10, in <module>
    sys.exit(main())
  File ".../site-packages/twistedchecker/core/runner.py", line 439, in main
    runner.run(sys.argv[1:])
  File ".../site-packages/twistedchecker/core/runner.py", line 315, in run
    self.linter.check(args)
  File ".../site-packages/pylint/lint.py", line 736, in check
    self._do_check(files_or_modules)
  File ".../site-packages/pylint/lint.py", line 867, in _do_check
    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
  File ".../site-packages/pylint/lint.py", line 947, in check_astroid_module
    walker.walk(ast_node)
  File ".../site-packages/pylint/utils.py", line 935, in walk
    cb(astroid)
  File ".../site-packages/twistedchecker/checkers/pycodestyleformat.py", line 182, in visit_module
    recorder = PyCodeStyleWarningRecorder(node.file)
  File ".../site-packages/twistedchecker/checkers/pycodestyleformat.py", line 50, in __init__
    self.run()
  File ".../site-packages/twistedchecker/checkers/pycodestyleformat.py", line 79, in run
    pycodestyle.Checker.check_all(self)
  File ".../site-packages/pycodestyle.py", line 2113, in check_all
    self.check_logical()
  File ".../site-packages/pycodestyle.py", line 1998, in check_logical
    for offset, text in self.run_check(check, argument_names) or ():
  File ".../site-packages/pycodestyle.py", line 1927, in run_check
    return check(*arguments)
TypeError: modifiedBlankLines() takes 7 positional arguments but 9 were given
@adiroiban
Copy link
Member

I think that this might be due to an update in pycodestyle.

I remember that I worked as removing pycodestyle from twistedchecker and running it as a separate tool twisted/twisted#969

and then we have PyCQA/pycodestyle#733

so upstream pycodestyle has support for tweaking it to work with twisted.

My suggestion is to remove pycodestuleformat.py from twistedchecker and just use upstream pycodestyle

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

No branches or pull requests

2 participants