snapcrafters / ruff

A community-maintained package to easily install ruff on Linux.
https://astral.sh/ruff
MIT License
1 stars 1 forks source link

Call for testing `ruff` #60

Closed github-actions[bot] closed 1 hour ago

github-actions[bot] commented 2 hours ago

A new version (0.6.6) of ruff was just pushed to the latest/candidate channel in the snap store. The following revisions are available.

CPU ArchitectureRevision
amd641143
arm641146
armhf1145
ppc64el1147
s390x1144

Automated testing

If configured, the snap will be installed in a VM, and any test results or screenshots will be posted to this issue as a comment shortly.

How to test it manually

  1. Stop the application if it was already running
  2. Upgrade to this version by running
snap refresh ruff --channel latest/candidate
  1. Start the app and test it out.
  2. Finally, add a comment below explaining whether this app is working, and include the output of the following command.
snap version; lscpu | grep Architecture; snap info ruff | grep installed

How to release it

Maintainers can promote this to stable by commenting /promote <rev>[,<rev>] latest/stable [done].

For example

  • To promote a single revision, run /promote <rev> latest/stable
  • To promote multiple revisions, run /promote <rev>,<rev> latest/stable
  • To promote a revision and close the issue, run /promote <rev>,<rev> latest/stable done

You can promote all revisions that were just built with:

/promote 1143,1146,1145,1147,1144 latest/stable done
github-actions[bot] commented 2 hours ago

Automated testing success.

Full logs are available at https://github.com/snapcrafters/ruff/actions/runs/10958040954. The first 100, and last 100 lines of the log are displayed in the Summary below.

Logs ``` ruff 0.6.6 (d01cbf7f8 2024-09-19) ::endgroup:: ::group::Help Ruff: An extremely fast Python linter and code formatter. Usage: ruff [OPTIONS] Commands: check Run Ruff on the given files or directories (default) rule Explain a rule (or all rules) config List or describe the available configuration options linter List all supported upstream linters clean Clear any caches in the current directory and any subdirectories format Run the Ruff formatter on the given files or directories server Run the language server analyze Run analysis over Python source code version Display Ruff's version help Print this message or the help of the given subcommand(s) Options: -h, --help Print help -V, --version Print version Log levels: -v, --verbose Enable verbose logging -q, --quiet Print diagnostics, but nothing else -s, --silent Disable all logging (but still exit with status code "1" upon detecting diagnostics) Global options: --config Either a path to a TOML configuration file (`pyproject.toml` or `ruff.toml`), or a TOML ` = ` pair (such as you might find in a `ruff.toml` configuration file) overriding a specific configuration option. Overrides of individual settings using this option always take precedence over all configuration files, including configuration files that were also specified using `--config` --isolated Ignore all configuration files For help with a specific command, see: `ruff help `. ::endgroup:: ::group::Rules: # airflow-variable-name-task-id-mismatch (AIR001) Derived from the **Airflow** linter. ## What it does Checks that the task variable name matches the `task_id` value for Airflow Operators. ## Why is this bad? When initializing an Airflow Operator, for consistency, the variable name should match the `task_id` value. This makes it easier to follow the flow of the DAG. ## Example ```python from airflow.operators import PythonOperator incorrect_name = PythonOperator(task_id="my_task") ``` Use instead: ```python from airflow.operators import PythonOperator my_task = PythonOperator(task_id="my_task") ``` # commented-out-code (ERA001) Derived from the **eradicate** linter. ## What it does Checks for commented-out Python code. ## Why is this bad? Commented-out code is dead code, and is often included inadvertently. It should be removed. ## Known problems Prone to false positives when checking comments that resemble Python code, but are not actually Python code ([#4845]). ## Example ```python # print("Hello, world!") ``` ## Options - `lint.task-tags` [#4845]: https://github.com/astral-sh/ruff/issues/4845 # fast-api-redundant-response-model (FAST001) Derived from the **FastAPI** linter. (Logs truncated. See full logs at: https://github.com/snapcrafters/ruff/actions/runs/10958040954) = help: Remove assignment to unused variable `fn_info` mypyc/irbuild/main.py:146:22: F841 Local variable `ret_type` is assigned to but never used | 145 | # Generate special function representing module top level. 146 | args, _, blocks, ret_type, _ = builder.leave() | ^^^^^^^^ F841 147 | sig = FuncSignature([], none_rprimitive) 148 | func_ir = FuncIR( | = help: Remove assignment to unused variable `ret_type` mypyc/test/test_analysis.py:75:29: UP031 Use format specifiers instead of percent format | 73 | post = ", ".join(sorted(names[reg] for reg in analysis_result.after[key])) 74 | actual.append( 75 | "%-8s %-23s %s" % ((key[0].label, key[1]), "{{{}}}".format(pre), "{{{}}}".format(post)) | ^^^^^^^^^^^^^^^ UP031 76 | ) 77 | assert_test_output(testcase, actual, "Invalid source code output") | = help: Replace with format specifiers mypyc/test/test_run.py:324:19: UP031 Use format specifiers instead of percent format | 322 | if proc.returncode != 0: 323 | print() 324 | print("*** Exit status: %d" % proc.returncode) | ^^^^^^^^^^^^^^^^^^^^^ UP031 325 | 326 | # Verify output. | = help: Replace with format specifiers mypyc/test/test_run.py:422:44: UP031 Use format specifiers instead of percent format | 420 | fnam = os.path.basename(fnam) 421 | message = re.sub( 422 | r"native\.py:([0-9]+):", lambda m: "%s:%d:" % (fnam, int(m.group(1)) + delta), message | ^^^^^^^^ UP031 423 | ) 424 | message = re.sub( | = help: Replace with format specifiers mypyc/test/test_run.py:426:19: UP031 Use format specifiers instead of percent format | 424 | message = re.sub( 425 | r'"native.py", line ([0-9]+),', 426 | lambda m: '"%s", line %d,' % (fnam, int(m.group(1)) + delta), | ^^^^^^^^^^^^^^^^ UP031 427 | message, 428 | ) | = help: Replace with format specifiers mypyc/test/testutil.py:214:15: UP031 Use format specifiers instead of percent format | 212 | lines = s.splitlines() 213 | for i, line in enumerate(lines): 214 | print("%-4d %s" % (i + 1, line)) | ^^^^^^^^^ UP031 | = help: Replace with format specifiers mypyc/transform/exceptions.py:121:35: UP031 Use format specifiers instead of percent format | 119 | negated = True 120 | else: 121 | assert False, "unknown error kind %d" % op.error_kind | ^^^^^^^^^^^^^^^^^^^^^^^ UP031 122 | 123 | # Void ops can't generate errors since error is always | = help: Replace with format specifiers Found 175 errors (84 fixed, 91 remaining). warning: The following rule may cause conflicts when used with the formatter: `ISC001`. To avoid unexpected behavior, we recommend disabling this rule, either by removing it from the `select` or `extend-select` configuration, or adding it to the `ignore` configuration. 17 files reformatted, 295 files left unchanged warning: The following rule may cause conflicts when used with the formatter: `ISC001`. To avoid unexpected behavior, we recommend disabling this rule, either by removing it from the `select` or `extend-select` configuration, or adding it to the `ignore` configuration. 40 files reformatted, 272 files left unchanged ::endgroup:: ::group::Repository: https://github.com/tiangolo/fastapi Cloning into 'ruff-snap-test-BQsJkmdK'... All checks passed! docs_src/sql_databases_peewee/sql_app/database.py:7:43: B039 Do not use mutable data structures for `ContextVar` defaults | 5 | DATABASE_NAME = "test.db" 6 | db_state_default = {"closed": None, "conn": None, "ctx": None, "transactions": None} 7 | db_state = ContextVar("db_state", default=db_state_default.copy()) | ^^^^^^^^^^^^^^^^^^^^^^^ B039 | = help: Replace with `None`; initialize with `.set()`` Found 4 errors (3 fixed, 1 remaining). 1306 files left unchanged 193 files reformatted, 1113 files left unchanged ::endgroup:: ```
lengau commented 1 hour ago

/promote 1143,1146,1145,1147,1144 latest/stable done

github-actions[bot] commented 1 hour ago

The following revisions were released to the latest/stable channel: 1143,1146,1145,1147,1144.