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

style: set line length to 99 #291

Merged
merged 2 commits into from
Sep 13, 2024
Merged

style: set line length to 99 #291

merged 2 commits into from
Sep 13, 2024

Conversation

tdstein
Copy link
Collaborator

@tdstein tdstein commented Sep 13, 2024

The maximum line length recommended in PEP-8 is 99.

Copy link

github-actions bot commented Sep 13, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1097 1051 96% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/posit/connect/client.py 99% 🟢
src/posit/connect/config.py 100% 🟢
src/posit/connect/content.py 100% 🟢
src/posit/connect/cursors.py 100% 🟢
src/posit/connect/env.py 100% 🟢
src/posit/connect/external/databricks.py 86% 🟢
src/posit/connect/external/snowflake.py 92% 🟢
src/posit/connect/groups.py 39% 🟢
src/posit/connect/hooks.py 100% 🟢
src/posit/connect/oauth/associations.py 100% 🟢
src/posit/connect/oauth/integrations.py 100% 🟢
src/posit/connect/oauth/oauth.py 100% 🟢
src/posit/connect/paginator.py 100% 🟢
src/posit/connect/permissions.py 100% 🟢
src/posit/connect/urls.py 100% 🟢
TOTAL 94% 🟢

updated for commit: eb477e0 by action🐍

@tdstein
Copy link
Collaborator Author

tdstein commented Sep 13, 2024

https://peps.python.org/pep-0008/#maximum-line-length

Some teams strongly prefer a longer line length. For code maintained exclusively or primarily by a team that can reach agreement on this issue, it is okay to increase the line length limit up to 99 characters, provided that comments and docstrings are still wrapped at 72 characters.

I prefer a longer line length. For what it's worth, the GitHub diff view side-by-side fits comfortably on my screen at this length.

@@ -37,7 +37,7 @@ version_file = "src/posit/_version.py"

[tool.ruff]
extend-exclude = ["integration/resources"]
line-length = 79
line-length = 99
Copy link
Collaborator

@dbkegley dbkegley Sep 13, 2024

Choose a reason for hiding this comment

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

How did you decide on 99? I need to update neovim with a config like this so that I get a visual when my lines are too long (mostly for doc writing since markdown handles wrapping automatically) but I can't decide on a good global default. The standard terminal width 80 feels too small and I think that would be annoying.

edit: nvm I just read your other comment!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Does NeoVim support line wraps?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably but I don't actually want the automatic wrapping in most cases because it tends to cause such large diffs when I edit files in repos that don't have any formatting enforcement. I prefer the visual so I can see when I'm editing a line that exceeds the length and I can just fix it while I'm in there for lines that I'm already changing.

The maximum line length recommended in PEP-8 is 99.

> Some teams strongly prefer a longer line length. For code maintained exclusively or primarily by a team that can reach agreement on this issue, it is okay to increase the line length limit up to 99 characters, provided that comments and docstrings are still wrapped at 72 characters.
@tdstein tdstein force-pushed the remove-ruff-line-length-setting branch from e6fa46d to eb477e0 Compare September 13, 2024 18:43
@tdstein tdstein merged commit 18f461d into main Sep 13, 2024
30 checks passed
@tdstein tdstein deleted the remove-ruff-line-length-setting branch September 13, 2024 18:45
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