Git Product home page Git Product logo

Comments (9)

sshishov avatar sshishov commented on August 18, 2024 5

Could we guys fix the issue? The issue is open for half of the year. Flake8 has already v6 btw

from blue.

krcb197 avatar krcb197 commented on August 18, 2024 1

I have been able to work around this problem by adding a dependency in setup.py for my project on flake8<=4.0.1, the same workaround can be done in a requirements.txt

from blue.

warsaw avatar warsaw commented on August 18, 2024 1

Okay, this does look like a trickier incompatibility to resolve. It looks like flake8 didn't just change the name of the config class, they changed the way they parse the configs. So I think for now, a quick fix is the pin in #79 but we should leave this issue open pending a proper fix.

from blue.

xmnlab avatar xmnlab commented on August 18, 2024 1

hey everyone, any plan for supporting flake8 v5 and v6?

from blue.

danigm avatar danigm commented on August 18, 2024

I think this patch will fix the issue

flake8-v5-compatibility.patch.txt

from blue.

warsaw avatar warsaw commented on August 18, 2024

I think this patch will fix the issue

Unfortunately, not completely. With this change as well:

modified   setup.py
@@ -37,7 +37,7 @@ setup(
     packages=['blue'],
     tests_require=['tox'],
     cmdclass={'test': Tox},
-    install_requires=['black==22.1.0', 'flake8>=3.8,<5.0.0'],
+    install_requires=['black==22.1.0', 'flake8>=3.8'],
     project_urls={
         'Documentation': 'https://blue.readthedocs.io/en/latest',
         'Source': 'https://github.com/grantjenks/blue.git',

(i.e. remove the flake8 ceiling), I get the following errors:

ctx = <click.core.Context object at 0x10a5d84f0>, param = <Option config>, value = None

    def read_configs(
        ctx: click.Context, param: click.Parameter, value: Optional[str]
    ) -> Optional[str]:
        """Read configs through the config param's callback hook."""
        # Use black's `read_pyproject_toml` for the default
        result = black.read_pyproject_toml(ctx, param, value)
        # Use flake8's config file parsing to load setup.cfg, tox.ini, and .blue
        # The parsing looks both in the project and user directories.
>       finder = flake8_config.ConfigFileFinder('blue')
E       AttributeError: module 'flake8.options.config' has no attribute 'ConfigFileFinder'

/Users/barry/projects/blue/blue/__init__.py:424: AttributeError

from blue.

sshishov avatar sshishov commented on August 18, 2024

@xmnlab I guess we have to come up with pull request for this to support it. Otherwise the issue will be open for years...

from blue.

warsaw avatar warsaw commented on August 18, 2024

If you can, I'll review it.

from blue.

kaweantonio avatar kaweantonio commented on August 18, 2024

If you can, I'll review it.

Hi, @warsaw, I opened PR #96 to fix this issue. Can you review it?

from blue.

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.