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

Enforce line length in linter and format code #8

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

Benedikt-Brunner
Copy link
Collaborator

Summary

This adds a config file for the ruff linter and enforces a character limit of 88. The code is reformated to fit this limit, the limit is explicitly ignored for doc strings and string literals, as these do not need to conform to it.


@Benedikt-Brunner Benedikt-Brunner added the Tooling Related to general tooling label Nov 26, 2024
@Benedikt-Brunner Benedikt-Brunner self-assigned this Nov 26, 2024
Copy link
Contributor

@Madddiiiin Madddiiiin left a comment

Choose a reason for hiding this comment

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

Why are we using 88 characters instead of the PEP8 standard 79 characters again? The implementation looks good though, so I approved it to not block anything. Just thought I'd ask.

@Benedikt-Brunner
Copy link
Collaborator Author

Modern Python formatters all aligned on a character limit of 88, see for example https://github.com/psf/black. As i also want to restrict us as little as possible i went with the more modern standard.

@Benedikt-Brunner Benedikt-Brunner merged commit 44e71f7 into main Nov 27, 2024
2 checks passed
@Benedikt-Brunner Benedikt-Brunner deleted the napytau/tooling/fix-linter-and-format-code branch November 27, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tooling Related to general tooling
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants