Datasets:

Modalities:
Tabular
Text
Formats:
json
Size:
< 1K
ArXiv:
DOI:
Libraries:
Datasets
Dask
galtimur's picture
Upload 78 files
8f0a8fd verified
{"language": "Python", "id": 18, "repo_owner": "django-import-export", "repo_name": "django-import-export", "head_branch": "remove_count_queries", "workflow_name": ".github/workflows/pre-commit.yml", "workflow_filename": "pre-commit.yml", "workflow_path": ".github/workflows/pre-commit.yml", "contributor": "PetrDlouhy", "sha_fail": "2a59b55e6124b33dca7f48c12845c78130b20fd5", "sha_success": "36786764b3ef1c4c3c8d0db451cea9e1b325616c", "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.1/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/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.1/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib\n##[endgroup]\nCollecting pre-commit\n Downloading pre_commit-3.6.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.33-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.25.0-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.8-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.1.0-py3-none-any.whl.metadata (11 kB)\nDownloading pre_commit-3.6.0-py2.py3-none-any.whl (204 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 204.0/204.0 kB 6.8 MB/s eta 0:00:00\nDownloading cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)\nDownloading identify-2.5.33-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 26.4 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 31.5 MB/s eta 0:00:00\nDownloading virtualenv-20.25.0-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 92.4 MB/s eta 0:00:00\nDownloading distlib-0.3.8-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 78.2 MB/s eta 0:00:00\nDownloading filelock-3.13.1-py3-none-any.whl (11 kB)\nDownloading platformdirs-4.1.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 93.4 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.8 filelock-3.13.1 identify-2.5.33 nodeenv-1.8.0 platformdirs-4.1.0 pre-commit-3.6.0 pyyaml-6.0.1 setuptools-69.0.2 virtualenv-20.25.0\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.1/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib\n##[endgroup]\ncfgv==3.4.0\ndistlib==0.3.8\nfilelock==3.13.1\nidentify==2.5.33\nnodeenv==1.8.0\nplatformdirs==4.1.0\npre-commit==3.6.0\nPyYAML==6.0.1\nsetuptools==69.0.2\nvirtualenv==20.25.0\n##[group]Run actions/cache@v3\nwith:\n path: ~/.cache/pre-commit\n key: pre-commit-3|/opt/hostedtoolcache/Python/3.12.1/x64|78083b3309c934e46e7d0a952b7a4c6dc6df8860edaa74474d06dd8c36e1b0a2\n enableCrossOsArchive: false\n fail-on-cache-miss: false\n lookup-only: false\nenv:\n pythonLocation: /opt/hostedtoolcache/Python/3.12.1/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib\n##[endgroup]\nCache Size: ~15 MB (15847689 B)\n[command]/usr/bin/tar -xf /home/runner/work/_temp/83ce4811-68cf-4484-bf4e-4cfbe36bb31a/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.1/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.1/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/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/admin.py\u001b[m\u001b[36m:\u001b[m749\u001b[36m:\u001b[m89\u001b[36m:\u001b[m \u001b[1m\u001b[31mE501\u001b[m line too long (96 > 88 characters)\n\u001b[1mimport_export/admin.py\u001b[m\u001b[36m:\u001b[m756\u001b[36m:\u001b[m89\u001b[36m:\u001b[m \u001b[1m\u001b[31mE501\u001b[m line too long (98 > 88 characters)\n\n##[error]Process completed with exit code 1.\n"}], "diff": "diff --git a/import_export/admin.py b/import_export/admin.py\nindex a1b288e9..8bb2db67 100644\n--- a/import_export/admin.py\n+++ b/import_export/admin.py\n@@ -746,14 +746,16 @@ class ExportMixin(BaseExportMixin, ImportExportMixinBase):\n def get_results(self, request):\n \"\"\"\n We override this method because we only call ChangeList.get_queryset()\n- so we don't need anything from this method. The get_results() gets called during\n- ChangeList.__init__() and we do want to avoid unnecessary COUNT queries.\n+ so we don't need anything from this method.\n+ The get_results() gets called during ChangeList.__init__()\n+ and we do want to avoid unnecessary COUNT queries.\n \"\"\"\n pass\n \n cl = ExportChangeList(**changelist_kwargs)\n \n- # get_queryset() is already called during initialization, it is enough to get it's results\n+ # get_queryset() is already called during initialization,\n+ # it is enough to get it's results\n if hasattr(cl, \"queryset\"):\n return cl.queryset\n \n", "difficulty": 1, "changed_files": ["import_export/admin.py"], "commit_link": "https://github.com/django-import-export/django-import-export/tree/2a59b55e6124b33dca7f48c12845c78130b20fd5"}