diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 78238bd66d60..f69cbb7ef77c 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -23,10 +23,10 @@ jobs: PGUSER: "odoo" steps: - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.7 - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Configuration run: | sudo apt update diff --git a/.github/workflows/flake.yml b/.github/workflows/flake.yml index 8655919a6272..44c67fc5b9b0 100644 --- a/.github/workflows/flake.yml +++ b/.github/workflows/flake.yml @@ -13,12 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.7 - - uses: actions/checkout@v2 + python-version: 3.8 + - uses: actions/checkout@v4 - name: Configuration - run: pip install flake8==3.4.1 + run: pip install flake8==4.0.1 - name: Flake8 Script run: | flake8 odoo/openupgrade --max-line-length=120 @@ -27,4 +27,7 @@ jobs: # only flake8 migration scripts from the openupgrade project, presumably # identifiable by using the openupgrade helpers flake8 --max-line-length=120 scripts $(find . \( -name 'pre-*.py' -or -name 'post-*.py' -or -name 'end-*.py' \) -exec grep -q openupgrade {} \; -print) - flake8 addons/*/migrations/*/tests/ --max-line-length=120 + if ls addons/*/migrations/*/tests/ > /dev/null 2>&1; then + flake8 addons/*/migrations/*/tests/ --max-line-length=120 --filename=__init__.py --ignore=F401 + flake8 addons/*/migrations/*/tests/ --max-line-length=120 --exclude=__init__.py + fi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32b607aa54b1..8c8afabb3c1a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: PGUSER: "odoo" steps: - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.7 - name: Configure Postgres @@ -50,7 +50,7 @@ jobs: # Line below may fail quite often due to Travis bug: # - git reset -q --hard $TRAVIS_COMMIT # Install Python requirements of target release - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Configuration run: | sudo apt update diff --git a/addons/stock/migrations/13.0.1.1/post-migration.py b/addons/stock/migrations/13.0.1.1/post-migration.py index bc39a6bd5ef6..5a9a769f1c44 100644 --- a/addons/stock/migrations/13.0.1.1/post-migration.py +++ b/addons/stock/migrations/13.0.1.1/post-migration.py @@ -195,7 +195,7 @@ def map_stock_picking_responsible_responsible_id_to_user_id(env): return env.cr.execute( - f""" + """ SELECT distinct rp.id, rp.name, rp.company_id, @@ -225,7 +225,7 @@ def map_stock_picking_responsible_responsible_id_to_user_id(env): # map responsible_id to user_id openupgrade.logged_query( env.cr, - f""" + """ WITH partner_user AS ( SELECT sp.id AS picking_id, rp.id AS partner_id, diff --git a/addons/website/migrations/13.0.1.0/post-migration.py b/addons/website/migrations/13.0.1.0/post-migration.py index 2cf796974043..8d0928b604a0 100644 --- a/addons/website/migrations/13.0.1.0/post-migration.py +++ b/addons/website/migrations/13.0.1.0/post-migration.py @@ -48,7 +48,7 @@ def _set_data_anchor_xml_attribute(env): ) for view in website_views: doc = fromstring(view.arch_db) - links = doc.cssselect("a[href^=\#]:not([href=\#])") + links = doc.cssselect(r"a[href^=\#]:not([href=\#])") if links: replacement = { "selector": ", ".join([link.attrib["href"] for link in links]),