File size: 9,780 Bytes
11c83cb
1
{"language": "Python", "id": 42, "repo_owner": "django-import-export", "repo_name": "django-import-export", "head_branch": "fix-declared-model-fields-altering-export-order", "workflow_name": ".github/workflows/pre-commit.yml", "workflow_filename": "pre-commit.yml", "workflow_path": ".github/workflows/pre-commit.yml", "contributor": "cocorocho", "sha_fail": "2f0605c9ec79b7a675728cb525ad55b36ade2e93", "sha_success": "d1e35b26f1cfc1bd08b03ac606fa8bcd26dc91cb", "workflow": "on:\n  pull_request:\n  push:\n    branches:\n      - main\n\njobs:\n  main:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v3\n    - uses: actions/setup-python@v4\n      with:\n        python-version: 3.x\n    - uses: pre-commit/[email protected]\n    - uses: pre-commit-ci/[email protected]\n      if: always()\n", "logs": [{"step_name": "main/4_Run [email protected]", "log": "##[group]Run pre-commit/[email protected]\nwith:\n  extra_args: --all-files\nenv:\n  pythonLocation: /opt/hostedtoolcache/Python/3.12.0/x64\n  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib/pkgconfig\n  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib\n##[endgroup]\n##[group]Run python -m pip install pre-commit\n\u001b[36;1mpython -m pip install pre-commit\u001b[0m\nshell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}\nenv:\n  pythonLocation: /opt/hostedtoolcache/Python/3.12.0/x64\n  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib/pkgconfig\n  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib\n##[endgroup]\nCollecting pre-commit\n  Downloading pre_commit-3.5.0-py2.py3-none-any.whl.metadata (1.3 kB)\nCollecting cfgv>=2.0.0 (from pre-commit)\n  Downloading cfgv-3.4.0-py2.py3-none-any.whl.metadata (8.5 kB)\nCollecting identify>=1.0.0 (from pre-commit)\n  Downloading identify-2.5.32-py2.py3-none-any.whl.metadata (4.4 kB)\nCollecting nodeenv>=0.11.1 (from pre-commit)\n  Downloading nodeenv-1.8.0-py2.py3-none-any.whl.metadata (21 kB)\nCollecting pyyaml>=5.1 (from pre-commit)\n  Downloading PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)\nCollecting virtualenv>=20.10.0 (from pre-commit)\n  Downloading virtualenv-20.24.7-py3-none-any.whl.metadata (4.5 kB)\nCollecting setuptools (from nodeenv>=0.11.1->pre-commit)\n  Downloading setuptools-69.0.2-py3-none-any.whl.metadata (6.3 kB)\nCollecting distlib<1,>=0.3.7 (from virtualenv>=20.10.0->pre-commit)\n  Downloading distlib-0.3.7-py2.py3-none-any.whl.metadata (5.1 kB)\nCollecting filelock<4,>=3.12.2 (from virtualenv>=20.10.0->pre-commit)\n  Downloading filelock-3.13.1-py3-none-any.whl.metadata (2.8 kB)\nCollecting platformdirs<5,>=3.9.1 (from virtualenv>=20.10.0->pre-commit)\n  Downloading platformdirs-4.0.0-py3-none-any.whl.metadata (11 kB)\nDownloading pre_commit-3.5.0-py2.py3-none-any.whl (203 kB)\n   \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 203.7/203.7 kB 15.8 MB/s eta 0:00:00\nDownloading cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)\nDownloading identify-2.5.32-py2.py3-none-any.whl (98 kB)\n   \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 98.9/98.9 kB 32.6 MB/s eta 0:00:00\nDownloading nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)\nDownloading PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (724 kB)\n   \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 725.0/725.0 kB 49.7 MB/s eta 0:00:00\nDownloading virtualenv-20.24.7-py3-none-any.whl (3.8 MB)\n   \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 3.8/3.8 MB 124.4 MB/s eta 0:00:00\nDownloading distlib-0.3.7-py2.py3-none-any.whl (468 kB)\n   \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 468.9/468.9 kB 84.7 MB/s eta 0:00:00\nDownloading filelock-3.13.1-py3-none-any.whl (11 kB)\nDownloading platformdirs-4.0.0-py3-none-any.whl (17 kB)\nDownloading setuptools-69.0.2-py3-none-any.whl (819 kB)\n   \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 819.5/819.5 kB 99.2 MB/s eta 0:00:00\nInstalling collected packages: distlib, setuptools, pyyaml, platformdirs, identify, filelock, cfgv, virtualenv, nodeenv, pre-commit\nSuccessfully installed cfgv-3.4.0 distlib-0.3.7 filelock-3.13.1 identify-2.5.32 nodeenv-1.8.0 platformdirs-4.0.0 pre-commit-3.5.0 pyyaml-6.0.1 setuptools-69.0.2 virtualenv-20.24.7\n\n[notice] A new release of pip is available: 23.2.1 -> 23.3.1\n[notice] To update, run: pip install --upgrade pip\n##[group]Run python -m pip freeze --local\n\u001b[36;1mpython -m pip freeze --local\u001b[0m\nshell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}\nenv:\n  pythonLocation: /opt/hostedtoolcache/Python/3.12.0/x64\n  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib/pkgconfig\n  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib\n##[endgroup]\ncfgv==3.4.0\ndistlib==0.3.7\nfilelock==3.13.1\nidentify==2.5.32\nnodeenv==1.8.0\nplatformdirs==4.0.0\npre-commit==3.5.0\nPyYAML==6.0.1\nsetuptools==69.0.2\nvirtualenv==20.24.7\n##[group]Run actions/cache@v3\nwith:\n  path: ~/.cache/pre-commit\n  key: pre-commit-3|/opt/hostedtoolcache/Python/3.12.0/x64|78083b3309c934e46e7d0a952b7a4c6dc6df8860edaa74474d06dd8c36e1b0a2\n  enableCrossOsArchive: false\n  fail-on-cache-miss: false\n  lookup-only: false\nenv:\n  pythonLocation: /opt/hostedtoolcache/Python/3.12.0/x64\n  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib/pkgconfig\n  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib\n##[endgroup]\nCache Size: ~15 MB (15834028 B)\n[command]/usr/bin/tar -xf /home/runner/work/_temp/98029e33-8cfe-40ab-80a4-dbe66e8ec82f/cache.tzst -P -C /home/runner/work/django-import-export/django-import-export --use-compress-program unzstd\nCache restored successfully\nCache restored from key: pre-commit-3|/opt/hostedtoolcache/Python/3.12.0/x64|78083b3309c934e46e7d0a952b7a4c6dc6df8860edaa74474d06dd8c36e1b0a2\n##[group]Run pre-commit run --show-diff-on-failure --color=always --all-files\n\u001b[36;1mpre-commit run --show-diff-on-failure --color=always --all-files\u001b[0m\nshell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}\nenv:\n  pythonLocation: /opt/hostedtoolcache/Python/3.12.0/x64\n  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib/pkgconfig\n  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0/x64\n  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.0/x64/lib\n##[endgroup]\nblack....................................................................\u001b[42mPassed\u001b[m\nisort....................................................................\u001b[42mPassed\u001b[m\nflake8...................................................................\u001b[41mFailed\u001b[m\n\u001b[2m- hook id: flake8\u001b[m\n\u001b[2m- exit code: 1\u001b[m\n\n\u001b[1mimport_export/resources.py\u001b[m\u001b[36m:\u001b[m1360\u001b[36m:\u001b[m89\u001b[36m:\u001b[m \u001b[1m\u001b[31mE501\u001b[m line too long (101 > 88 characters)\n\n##[error]Process completed with exit code 1.\n"}], "diff": "diff --git a/import_export/resources.py b/import_export/resources.py\nindex 7d7ad475..99c3fe91 100644\n--- a/import_export/resources.py\n+++ b/import_export/resources.py\n@@ -1357,7 +1357,8 @@ class ModelDeclarativeMetaclass(DeclarativeMetaclass):\n                     continue\n \n                 if f.name in declared_fields:\n-                    # If model field is declared in `ModelResource`, remove it from `declared_fields`\n+                    # If model field is declared in `ModelResource`,\n+                    # remove it from `declared_fields`\n                     # to keep exact order of model fields\n                     field = declared_fields.pop(f.name)\n                 else:\n", "difficulty": 0, "changed_files": ["import_export/resources.py"], "commit_link": "https://github.com/django-import-export/django-import-export/tree/2f0605c9ec79b7a675728cb525ad55b36ade2e93"}