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

Automatically resolving flake8-conda: C0301: line too long? #139

Open
a-t-0 opened this issue Sep 7, 2022 · 0 comments
Open

Automatically resolving flake8-conda: C0301: line too long? #139

a-t-0 opened this issue Sep 7, 2022 · 0 comments

Comments

@a-t-0
Copy link

a-t-0 commented Sep 7, 2022

Context

While running a flake8-conda check using pre-commit, the outcome prompts me:

code/project1/src/Datapoints.py:8:0: C0301: Line too long (137/100) (line-too-long)
code/project1/src/Datapoints.py:12:0: C0301: Line too long (181/100) (line-too-long)
code/project1/src/Datapoints.py:24:0: C0301: Line too long (130/100) (line-too-long)
code/project1/src/Datapoints.py:25:0: C0301: Line too long (123/100) (line-too-long)
code/project1/src/Datapoints.py:38:0: C0301: Line too long (173/100) (line-too-long)
code/project1/src/Datapoints.py:108:0: C0301: Line too long (104/100) (line-too-long)
code/project1/src/Datapoints.py:113:0: C0301: Line too long (102/100) (line-too-long)
code/project1/src/Datapoints.py:123:0: C0301: Line too long (103/100) (line-too-long)

An example for line 24 and 25, is:

        # Source: https://www.cips.org/supply-management/news/2016/november/logistics-industry-forecast-to-be-worth-155tn-by-2023/
        # NOTE: this article seems an unreliable source and is outdated, hence the 0.15 should possibly be changed/updated.
        self.logistics_market_share_dhl_fedex_ups = 0.15

Question

Is it possible to tell flake8-conda to automatically resolve the line-lengths where possible?

Expected Output

For example, I would expect it is (at least) able to rewrite the last commented line to:

        # Source: 
        # https://www.cips.org/supply-management/news/2016/november/logistics-industry-forecast-to-be-worth-155tn-by-2023/
        # NOTE: this article seems an unreliable source and is outdated, hence
        # the 0.15 should possibly be changed/updated.
        self.logistics_market_share_dhl_fedex_ups = 0.15
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

1 participant