Skip to content
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

Call for testing ruff #76

Closed
github-actions bot opened this issue Jan 11, 2025 · 3 comments
Closed

Call for testing ruff #76

github-actions bot opened this issue Jan 11, 2025 · 3 comments
Labels

Comments

@github-actions
Copy link

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

CPU ArchitectureRevision
amd641229
arm641231
armhf1232
ppc64el1233
riscv641234
s390x1230

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 1229,1231,1232,1233,1234,1230 latest/stable done
Copy link
Author

Automated testing success.

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

Logs
ruff 0.9.1 (12f86f39a 2025-01-10)
::endgroup::
::group::Help
Ruff: An extremely fast Python linter and code formatter.

Usage: ruff [OPTIONS] <COMMAND>

Commands:
check    Run Ruff on the given files or directories
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 <CONFIG_OPTION>  Either a path to a TOML configuration file (`pyproject.toml` or
                              `ruff.toml`), or a TOML `<KEY> = <VALUE>` 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 <command>`.
::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:

from airflow.operators import PythonOperator


my_task = PythonOperator(task_id="my_task")

airflow-dag-no-schedule-argument (AIR301)

Derived from the Airflow linter.

This rule is in preview and is not stable. The --preview flag is required for use.

What it does

Checks for a DAG() class or @dag() decorator without an explicit
schedule parameter.

Why is this bad?

The default schedule value on Airflow 2 is timedelta(days=1), which is
almost never what a user is looking for. Airflow 3 changes this the default
to None, and would break existing DAGs using the implicit default.

If your DAG does not have an explicit schedule argument, Airflow 2
schedules a run for it every day (at the time determined by start_date).
Such a DAG will no longer be scheduled on Airflow 3 at all, without any
exceptions or other messages visible to the user.

Example

from airflow import DAG


# Using the implicit default schedule.
dag = DAG(dag_id="my_dag")

(Logs truncated. See full logs at: https://github.com/snapcrafters/ruff/actions/runs/12723360425)

docs_src/dependencies/tutorial003_an_py39.py:11:1: B903 Class could be dataclass or namedtuple
|
11 | / class CommonQueryParams:
12 | | def init(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
13 | | self.q = q
14 | | self.skip = skip
15 | | self.limit = limit
| |__________________________^ B903
|

docs_src/dependencies/tutorial003_py310.py:9:1: B903 Class could be dataclass or namedtuple
|
9 | / class CommonQueryParams:
10 | | def init(self, q: str | None = None, skip: int = 0, limit: int = 100):
11 | | self.q = q
12 | | self.skip = skip
13 | | self.limit = limit
| |__________________________^ B903
|

docs_src/dependencies/tutorial004.py:11:1: B903 Class could be dataclass or namedtuple
|
11 | / class CommonQueryParams:
12 | | def init(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
13 | | self.q = q
14 | | self.skip = skip
15 | | self.limit = limit
| |__________________________^ B903
|

docs_src/dependencies/tutorial004_an.py:12:1: B903 Class could be dataclass or namedtuple
|
12 | / class CommonQueryParams:
13 | | def init(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
14 | | self.q = q
15 | | self.skip = skip
16 | | self.limit = limit
| |__________________________^ B903
|

docs_src/dependencies/tutorial004_an_py310.py:11:1: B903 Class could be dataclass or namedtuple
|
11 | / class CommonQueryParams:
12 | | def init(self, q: str | None = None, skip: int = 0, limit: int = 100):
13 | | self.q = q
14 | | self.skip = skip
15 | | self.limit = limit
| |__________________________^ B903
|

docs_src/dependencies/tutorial004_an_py39.py:11:1: B903 Class could be dataclass or namedtuple
|
11 | / class CommonQueryParams:
12 | | def init(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
13 | | self.q = q
14 | | self.skip = skip
15 | | self.limit = limit
| |__________________________^ B903
|

docs_src/dependencies/tutorial004_py310.py:9:1: B903 Class could be dataclass or namedtuple
|
9 | / class CommonQueryParams:
10 | | def init(self, q: str | None = None, skip: int = 0, limit: int = 100):
11 | | self.q = q
12 | | self.skip = skip
13 | | self.limit = limit
| |__________________________^ B903
|

docs_src/python_types/tutorial010.py:1:1: B903 Class could be dataclass or namedtuple
|
1 | / class Person:
2 | | def init(self, name: str):
3 | | self.name = name
| |________________________^ B903
|

tests/test_jsonable_encoder.py:17:1: B903 Class could be dataclass or namedtuple
|
17 | / class Person:
18 | | def init(self, name: str):
19 | | self.name = name
| |________________________^ B903
|

tests/test_jsonable_encoder.py:22:1: B903 Class could be dataclass or namedtuple
|
22 | / class Pet:
23 | | def init(self, owner: Person, name: str):
24 | | self.owner = owner
25 | | self.name = name
| |________________________^ B903
|

Found 21 errors (3 fixed, 18 remaining).
11 files reformatted, 1254 files left unchanged
183 files reformatted, 1082 files left unchanged
::endgroup::


</details>

@lengau
Copy link
Contributor

lengau commented Jan 12, 2025

/promote 1229,1231,1232,1233,1234,1230 latest/stable done

Copy link
Author

The following revisions were released to the latest/stable channel: 1229,1231,1232,1233,1234,1230.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant