Skip to content

Commit

Permalink
Add basic ruff config
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Oct 20, 2024
1 parent fbdc894 commit 3631177
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
15 changes: 5 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
exclude: |
(?x)
^template/
default_language_version:
python: python3
repos:
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
hooks:
- id: flake8
name: flake8
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
- id: ruff
args: [--fix]
- id: ruff-format
4 changes: 2 additions & 2 deletions tools/copier_update.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Run copier update on a branch in all addons repos.
"""
"""Run copier update on a branch in all addons repos."""

import subprocess
import textwrap
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tools/create_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
TODO
- load copier answers from a previous branch
"""

import subprocess

import click
Expand Down
1 change: 1 addition & 0 deletions tools/fix_manifest_website.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Set the website key in addons manifests."""

import os
import re

Expand Down
1 change: 1 addition & 0 deletions tools/oca_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
OCA_REPOSITORY_NAMES: list of OCA repository names
"""

from __future__ import print_function
from contextlib import contextmanager
import os
Expand Down
1 change: 1 addition & 0 deletions tools/oca_sync_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
This enables adding them to project teams in the OCA instance.
"""

from __future__ import absolute_import, print_function

import xmlrpclib
Expand Down
2 changes: 1 addition & 1 deletion tools/odoo_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def get_parser(with_help=False):
action="store_true",
help="Store the username and password in a "
"configuration file. Warning, clear text!",
),
)
return parser


Expand Down
1 change: 1 addition & 0 deletions tools/set_repo_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Create and modify labels on github to have same labels and same color
on all repo
"""

from __future__ import print_function
import click

Expand Down

0 comments on commit 3631177

Please sign in to comment.