GithubHelp home page GithubHelp logo

Comments (3)

groteworld avatar groteworld commented on August 20, 2024

Does flake8, the command line tool, itself work with the new pep8 installed?

from sublimelinter-flake8.

fabianbuechler avatar fabianbuechler commented on August 20, 2024

Yes it does.

I've got the same problem with pyflakes at the moment, but also had it with pep8 at times:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 158, in on_api_ready
    m.plugin_loaded()
  File "/Users/fabianbuechler/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/sublimelinter.py", line 34, in plugin_loaded
    linter.initialize()
  File "linter in /Users/fabianbuechler/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter-flake8.sublime-package", line 94, in initialize
  File "/Users/fabianbuechler/.pyenv/versions/3.4.3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2354, in load
    self.require(*args, **kwargs)
  File "/Users/fabianbuechler/.pyenv/versions/3.4.3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2371, in require
    items = working_set.resolve(reqs, env, installer)
  File "/Users/fabianbuechler/.pyenv/versions/3.4.3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 844, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (pyflakes 1.0.0 (/Users/fabianbuechler/.pyenv/versions/3.4.3/lib/python3.4/site-packages), Requirement.parse('pyflakes<0.9,>=0.8.1'))

I've got these versions of flake8, pyflakes, pep8, pep257 and mccabe installed:

  • flake8: 2.4.1
  • mccabe: 0.3.1
  • pep257: 0.6.0
  • pep8: 1.6.2
  • pyflakes: 1.0.0

Works without any problems when calling flake8 directly, but the linter plugin does not work, likely due to the pkg_resources.load call, which checks install_requires. flake8 has these versions defined in its setup.py:

    install_requires=[
        "pyflakes >= 0.8.1, < 0.9",
        "pep8 >= 1.5.7, != 1.6.0, != 1.6.1, != 1.6.2",
        "mccabe >= 0.2.1, < 0.4",
    ],

But since it still works when using it directly, why does the linter plugin need to do this check?

from sublimelinter-flake8.

Ap0c avatar Ap0c commented on August 20, 2024

I got around this problem by downgrading pep8 to version 1.5.7, as described in this StackOverflow post.

It seems that flake8 has blacklisted recent versions of pep8.

from sublimelinter-flake8.

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.