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

Flake8 #19

Merged
merged 10 commits into from
Dec 28, 2019
Merged

Flake8 #19

merged 10 commits into from
Dec 28, 2019

Conversation

Korijn
Copy link
Collaborator

@Korijn Korijn commented Dec 24, 2019

Partly addresses #12

Note: I can't run the codegen-script since I don't have a binary yet. I tried adjusting it to produce noqa comments but I can't verify if it works properly. It probably fails to do so because it is used in conjunction with black, so we can't tell on which lines the violations will end up

Either way, this PR:

  • Configures flake8 to be compatible with black (according to their docs)
  • Fixes flake8 violations (a few)
  • Adds specific error ignores to lines I couldn't/didn't know how to fix (a lot)
  • Runs flake8 in CI
  • Also runs black on python files in the root of the repo on CI
  • Removed existing # noqa that didn't trigger violations

I'm unsure of the following changes:

from py2spirv import python2spirv, i32, vec2, vec3, vec4

Is that how it's supposed to be done?

@Korijn Korijn requested a review from almarklein December 24, 2019 10:36
@almarklein
Copy link
Member

almarklein commented Dec 24, 2019

I can't run the codegen-script since I don't have a binary yet.

It does not load the binary :) Also, the files it generates are blackified before writing, so I'm curious what noqa's were needed.

Will have a proper look at this PR after xmas :)

@Korijn
Copy link
Collaborator Author

Korijn commented Dec 25, 2019

It does not load the binary :)

Really! Doh. I should have just tried it.

Also, the files it generates are blackified before writing, so I'm curious what noqa's were needed.

Black doesn't fix comments that exceed max line length, for example. Also, the undefined type hints.

@almarklein
Copy link
Member

Black doesn't fix comments that exceed max line length, for example. Also, the undefined type hints.

Maybe we should simply disable line length checking on flake8.

@almarklein almarklein merged commit 5b7a666 into master Dec 28, 2019
@almarklein almarklein deleted the flake8 branch December 28, 2019 12:09
Copy link
Member

@almarklein almarklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Korijn
Copy link
Collaborator Author

Korijn commented Dec 28, 2019

I would be ok with disabling that check!

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

Successfully merging this pull request may close these issues.

2 participants