Skip to content

Conversation

@FranzBusch
Copy link
Member

Motivation

We want to lint our python files but also need to include our license header.

Modification

This PR ignores a few python flake rules to make sure the license headers pass.

Result

Passing license headers.

@FranzBusch FranzBusch requested a review from a team as a code owner October 14, 2024 17:57
pip3 install flake8 flake8-import-order
cd ${GITHUB_WORKSPACE}
flake8
flake8 --extend-ignore=E265,E266,E501
Copy link
Member

Choose a reason for hiding this comment

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

Completely disabling maximum line length (E501) seems a little to lenient to me. I think projects should be able to enforce that.

What do you think about the following instead?

  • Instead of passing an ignore list to flake8 here, we install a default .flake8 file to / on the runner. That way we use the default .flake8 unless a repo overrides it.
  • In that default format file, we set max-line-length = 88, matching what the compiler repo does. This would also fit license header

@FranzBusch FranzBusch force-pushed the fb-pythong-ignore branch 2 times, most recently from 0664f86 to 86633e6 Compare October 14, 2024 19:47
# Motivation

We want to lint our python files but also need to include our license header.

# Modification

This PR ignores a few python flake rules to make sure the license headers pass.

# Result

Passing license headers.
@FranzBusch
Copy link
Member Author

The CI failure here is expected since the default conflict is being pulled from main.

@FranzBusch FranzBusch merged commit c9a4e25 into main Oct 14, 2024
8 of 9 checks passed
@FranzBusch FranzBusch deleted the fb-pythong-ignore branch October 14, 2024 21:25
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.

3 participants