-
Notifications
You must be signed in to change notification settings - Fork 10
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
dev: Add Most F Rules to Worker #496
Merged
+73
−48
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Exclude a variety of commonly ignored directories. | ||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".git-rewrite", | ||
".hg", | ||
".ipynb_checkpoints", | ||
".mypy_cache", | ||
".nox", | ||
".pants.d", | ||
".pyenv", | ||
".pytest_cache", | ||
".pytype", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
".vscode", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"site-packages", | ||
"venv", | ||
] | ||
|
||
# Same as Black. | ||
line-length = 88 | ||
indent-width = 4 | ||
|
||
# Assume Python 3.12 | ||
target-version = "py312" | ||
|
||
[lint] | ||
# Currently only enabled for most F (Pyflakes) and I (isort) rules: https://docs.astral.sh/ruff/rules/ | ||
select = ["F", "I"] | ||
ignore = ["F841", "F405", "F403"] | ||
|
||
# Allow fix for all enabled rules (when `--fix`) is provided. | ||
# The preferred method (for now) w.r.t. fixable rules is to manually update the makefile | ||
# with --fix and re-run 'make lint' | ||
fixable = ["ALL"] | ||
unfixable = [] | ||
|
||
# Allow unused variables when underscore-prefixed. | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
|
||
[format] | ||
# Like Black, use double quotes for strings. | ||
quote-style = "double" | ||
|
||
# Like Black, indent with spaces, rather than tabs. | ||
indent-style = "space" | ||
|
||
# Like Black, respect magic trailing commas. | ||
skip-magic-trailing-comma = false | ||
|
||
# Like Black, automatically detect the appropriate line ending. | ||
line-ending = "auto" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,8 +55,8 @@ def get_upgrade_message(self, comparison: Comparison) -> str: | |
[ | ||
f"The author of this PR, {author_username}, is not an activated member of this organization on Codecov.", | ||
f"Please [activate this user on Codecov]({links['members_url']}) to display a detailed status check.", | ||
f"Coverage data is still being uploaded to Codecov.io for purposes of overall coverage calculations.", | ||
f"Please don't hesitate to email us at [email protected] with any questions.", | ||
"Coverage data is still being uploaded to Codecov.io for purposes of overall coverage calculations.", | ||
"Please don't hesitate to email us at [email protected] with any questions.", | ||
] | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -413,8 +413,8 @@ def _create_reached_upload_limit_message(self, comparison): | |
f"This org is currently on the free Basic Plan; which includes 250 free private repo uploads each rolling month.\ | ||
This limit has been reached and additional reports cannot be generated. For unlimited uploads,\ | ||
upgrade to our [pro plan]({links['plan_url']}).", | ||
f"", | ||
f"**Do you have questions or need help?** Connect with our sales team today at ` [email protected] `", | ||
"", | ||
"**Do you have questions or need help?** Connect with our sales team today at ` [email protected] `", | ||
] | ||
|
||
def _create_upgrade_message(self, comparison): | ||
|
@@ -430,15 +430,15 @@ def _create_upgrade_message(self, comparison): | |
return [ | ||
f"The author of this PR, {author_username}, is not an activated member of this organization on Codecov.", | ||
f"Please [activate this user on Codecov]({links['members_url_cloud']}) to display this PR comment.", | ||
f"Coverage data is still being uploaded to Codecov.io for purposes of overall coverage calculations.", | ||
f"Please don't hesitate to email us at [email protected] with any questions.", | ||
"Coverage data is still being uploaded to Codecov.io for purposes of overall coverage calculations.", | ||
"Please don't hesitate to email us at [email protected] with any questions.", | ||
] | ||
else: | ||
return [ | ||
f"The author of this PR, {author_username}, is not activated in your Codecov Self-Hosted installation.", | ||
f"Please [activate this user]({links['members_url_self_hosted']}) to display this PR comment.", | ||
f"Coverage data is still being uploaded to Codecov Self-Hosted for the purposes of overall coverage calculations.", | ||
f"Please contact your Codecov On-Premises installation administrator with any questions.", | ||
"Coverage data is still being uploaded to Codecov Self-Hosted for the purposes of overall coverage calculations.", | ||
"Please contact your Codecov On-Premises installation administrator with any questions.", | ||
] | ||
|
||
def _create_processing_upload_message(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -543,12 +543,12 @@ async def test_notify_upload_limited( | |
assert result.notification_successful | ||
assert result.explanation is None | ||
expected_message = [ | ||
f"## [Codecov](https://app.codecov.io/plan/gh/test-acc9) upload limit reached :warning:", | ||
f"This org is currently on the free Basic Plan; which includes 250 free private repo uploads each rolling month.\ | ||
"## [Codecov](https://app.codecov.io/plan/gh/test-acc9) upload limit reached :warning:", | ||
"This org is currently on the free Basic Plan; which includes 250 free private repo uploads each rolling month.\ | ||
This limit has been reached and additional reports cannot be generated. For unlimited uploads,\ | ||
upgrade to our [pro plan](https://app.codecov.io/plan/gh/test-acc9).", | ||
f"", | ||
f"**Do you have questions or need help?** Connect with our sales team today at ` [email protected] `", | ||
"", | ||
"**Do you have questions or need help?** Connect with our sales team today at ` [email protected] `", | ||
] | ||
for exp, res in zip(result.data_sent["message"], expected_message): | ||
assert exp == res | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strip is an unused Param here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was already fixed after rebasing 🤷