- Notifications
You must be signed in to change notification settings - Fork262
chore: re-enable ruff warnings#961
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -73,7 +73,6 @@ jobs: | ||
| - name: ruff | ||
| run: | | ||
| python -m ruff check . \ | ||
| --output-format=full \ | ||
| --exit-non-zero-on-fix | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -222,6 +222,8 @@ ignore = [ | ||
| "DTZ", | ||
| # flake8-errmsg | ||
| "EM", | ||
| # Some todos and some examples; leave this disabled for now | ||
| "ERA001", | ||
codejedi365 marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| # don't compare types, use isinstance() | ||
| # sometimes using type(x) == y is deliberately chosen to exclude | ||
| # subclasses | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -58,7 +58,7 @@ def _init_runtime_ctx(self) -> RuntimeContext: | ||
| try: | ||
| if was_conf_file_user_provided and not conf_file_exists: | ||
| raise FileNotFoundError( # noqa: TRY301 | ||
wyardley marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| f"File {self.global_opts.config_file} does not exist" | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -59,7 +59,7 @@ def __init__( | ||
| hvcs_api_domain:str|None=None, | ||
| token:str|None=None, | ||
| allow_insecure:bool=False, | ||
| **kwargs:Any,# noqa: ARG002 | ||
wyardley marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| )->None: | ||
| super().__init__(remote_url) | ||
| self.token=token | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -609,7 +609,7 @@ def test_create_or_update_release_when_create_fails_and_update_fails( | ||
| ) | ||
| # Execute in mocked environment expecting a GitlabUpdateError to be raised | ||
| withcreate_release_patch,edit_release_notes_patch,get_release_by_id_patch:# noqa: SIM117 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. What is this about... seems like a ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. It's the nested https://docs.astral.sh/ruff/rules/multiple-with-statements/ If the raises could be a decorator, maybe that would look better, but I think just ignoring it is probably fine here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Well the doc doesn't consider this situation for creation of the context manger is multiple lines and prior to the with statement. Yes, ignore is fine here. | ||
| withpytest.raises(gitlab.GitlabUpdateError): | ||
| default_gl_client.create_or_update_release( | ||
| A_GOOD_TAG,RELEASE_NOTES,prerelease | ||