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` #41

Closed github-actions[bot] closed 6 months ago

github-actions[bot] commented 6 months ago

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

CPU ArchitectureRevision
amd641053
arm641056
armhf1055
ppc64el1054
riscv641058
s390x1057

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
  3. Start the app and test it out.

  4. 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 1053,1056,1055,1054,1058,1057 latest/stable done
github-actions[bot] commented 6 months ago

Automated testing success.

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

Logs ``` ruff 0.4.4 (3e8878a1c 2024-05-09) ::endgroup:: ::group::Help Ruff: An extremely fast Python linter. 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 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 # sys-version-slice3 (YTT101) Derived from the **flake8-2020** linter. ## What it does (Logs truncated. See full logs at: https://github.com/snapcrafters/ruff/actions/runs/9179039758) 63 | final_value = final_var.final_value | = help: Remove assignment to unused variable `native` mypyc/irbuild/function.py:333:22: F841 Local variable `ret_type` is assigned to but never used | 331 | symtable = builder.symtables[-1] 332 | 333 | args, _, blocks, ret_type, fn_info = builder.leave() | ^^^^^^^^ F841 334 | 335 | if fn_info.is_generator: | = help: Remove assignment to unused variable `ret_type` mypyc/irbuild/function.py:419:14: F841 Local variable `func_reg` is assigned to but never used | 417 | name = fdef.name 418 | class_ir = builder.mapper.type_to_ir[cdef.info] 419 | func_ir, func_reg = gen_func_item(builder, fdef, name, builder.mapper.fdef_to_sig(fdef), cdef) | ^^^^^^^^ F841 420 | builder.functions.append(func_ir) | = help: Remove assignment to unused variable `func_reg` mypyc/irbuild/function.py:955:29: F841 Local variable `fn_info` is assigned to but never used | 953 | ret_val = builder.builder.call(callable_class_decl, args, arg_kinds, arg_names, line) 954 | builder.add(Return(ret_val)) 955 | arg_regs, _, blocks, _, fn_info = builder.leave() | ^^^^^^^ F841 956 | return FuncIR(decl, arg_regs, blocks) | = help: Remove assignment to unused variable `fn_info` mypyc/irbuild/function.py:1067:22: F841 Local variable `ret_type` is assigned to but never used | 1065 | else: 1066 | builder.add(Unreachable()) 1067 | args, _, blocks, ret_type, fn_info = builder.leave() | ^^^^^^^^ F841 1068 | return FuncIR(func_decl, args, blocks) | = help: Remove assignment to unused variable `ret_type` mypyc/irbuild/function.py:1067:32: F841 Local variable `fn_info` is assigned to but never used | 1065 | else: 1066 | builder.add(Unreachable()) 1067 | args, _, blocks, ret_type, fn_info = builder.leave() | ^^^^^^^ F841 1068 | return FuncIR(func_decl, args, blocks) | = help: Remove assignment to unused variable `fn_info` mypyc/irbuild/function.py:1087:22: F841 Local variable `ret_type` is assigned to but never used | 1085 | builder.add(SetAttr(self_reg, attr_name, value_reg, -1)) 1086 | builder.add(Return(builder.none())) 1087 | args, _, blocks, ret_type, fn_info = builder.leave() | ^^^^^^^^ F841 1088 | return FuncIR(func_decl, args, blocks) | = help: Remove assignment to unused variable `ret_type` mypyc/irbuild/function.py:1087:32: F841 Local variable `fn_info` is assigned to but never used | 1085 | builder.add(SetAttr(self_reg, attr_name, value_reg, -1)) 1086 | builder.add(Return(builder.none())) 1087 | args, _, blocks, ret_type, fn_info = builder.leave() | ^^^^^^^ F841 1088 | return FuncIR(func_decl, args, blocks) | = help: Remove assignment to unused variable `fn_info` mypyc/irbuild/main.py:145:22: F841 Local variable `ret_type` is assigned to but never used | 144 | # Generate special function representing module top level. 145 | args, _, blocks, ret_type, _ = builder.leave() | ^^^^^^^^ F841 146 | sig = FuncSignature([], none_rprimitive) 147 | func_ir = FuncIR( | = help: Remove assignment to unused variable `ret_type` Found 114 errors (84 fixed, 30 remaining). warning: The following rules may cause conflicts when used with the formatter: `ISC001`. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding them to the `ignore` configuration. 17 files reformatted, 295 files left unchanged warning: The following rules may cause conflicts when used with the formatter: `ISC001`. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding them to the `ignore` configuration. 41 files reformatted, 271 files left unchanged ::endgroup:: ::group::Repository: https://github.com/tiangolo/fastapi Cloning into 'ruff-snap-test-oZb7VncV'... All checks passed! Found 3 errors (3 fixed, 0 remaining). 5 files reformatted, 1212 files left unchanged 179 files reformatted, 1038 files left unchanged ::endgroup:: ```
lengau commented 6 months ago

/promote 1053,1056,1055,1054,1058,1057 latest/stable done

github-actions[bot] commented 6 months ago

The following revisions were released to the latest/stable channel: 1053,1056,1055,1054,1058,1057.