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

Closed github-actions[bot] closed 3 months ago

github-actions[bot] commented 3 months ago

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

CPU ArchitectureRevision
amd641101
arm641102
armhf1103
ppc64el1104
s390x1105

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 1101,1102,1103,1104,1105 latest/stable done
github-actions[bot] commented 3 months ago

Automated testing success.

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

Logs ``` ruff 0.5.7 (221ea662e 2024-08-08) ::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 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. Fix is always available. (Logs truncated. See full logs at: https://github.com/snapcrafters/ruff/actions/runs/10393371951) 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: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` Found 117 errors (83 fixed, 34 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. 40 files reformatted, 272 files left unchanged ::endgroup:: ::group::Repository: https://github.com/tiangolo/fastapi Cloning into 'ruff-snap-test-uFIMUccd'... fastapi/routing.py:458:18: UP037 [*] Remove quotes from type annotation | 456 | if isinstance(generate_unique_id_function, DefaultPlaceholder): 457 | current_generate_unique_id: Callable[ 458 | ["APIRoute"], str | ^^^^^^^^^^ UP037 459 | ] = generate_unique_id_function.value 460 | else: | = help: Remove quotes tests/test_inherited_custom_class.py:39:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks | 37 | asyncpg_uuid = MyUuid("a10ff360-3b1e-4984-a26f-d3ab460bdb51") 38 | assert isinstance(asyncpg_uuid, uuid.UUID) 39 | assert type(asyncpg_uuid) != uuid.UUID | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E721 40 | with pytest.raises(TypeError): 41 | vars(asyncpg_uuid) | tests/test_inherited_custom_class.py:82:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks | 80 | asyncpg_uuid = MyUuid("a10ff360-3b1e-4984-a26f-d3ab460bdb51") 81 | assert isinstance(asyncpg_uuid, uuid.UUID) 82 | assert type(asyncpg_uuid) != uuid.UUID | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E721 83 | with pytest.raises(TypeError): 84 | vars(asyncpg_uuid) | Found 3 errors. [*] 1 fixable with the `--fix` option. 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()`` tests/test_inherited_custom_class.py:39:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks | 37 | asyncpg_uuid = MyUuid("a10ff360-3b1e-4984-a26f-d3ab460bdb51") 38 | assert isinstance(asyncpg_uuid, uuid.UUID) 39 | assert type(asyncpg_uuid) != uuid.UUID | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E721 40 | with pytest.raises(TypeError): 41 | vars(asyncpg_uuid) | tests/test_inherited_custom_class.py:82:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks | 80 | asyncpg_uuid = MyUuid("a10ff360-3b1e-4984-a26f-d3ab460bdb51") 81 | assert isinstance(asyncpg_uuid, uuid.UUID) 82 | assert type(asyncpg_uuid) != uuid.UUID | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E721 83 | with pytest.raises(TypeError): 84 | vars(asyncpg_uuid) | Found 7 errors (4 fixed, 3 remaining). 5 files reformatted, 1215 files left unchanged 179 files reformatted, 1041 files left unchanged ::endgroup:: ```
lengau commented 3 months ago

/promote 1101,1102,1103,1104,1105 latest/stable done

github-actions[bot] commented 3 months ago

The following revisions were released to the latest/stable channel: 1101,1102,1103,1104,1105.