From d9f86948b44d5132acee6cce37189b4630919303 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 23:07:02 -0600 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#1820) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v3.18.0 → v3.19.1](https://github.com/asottile/pyupgrade/compare/v3.18.0...v3.19.1) - [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.14.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.11.2...v1.14.0) - [github.com/executablebooks/mdformat: 0.7.18 → 0.7.21](https://github.com/executablebooks/mdformat/compare/0.7.18...0.7.21) * Fix readme + ignore type error in swift.py as we want to deprecated swift support in an up comming release --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Cooper Ry Lees --- .pre-commit-config.yaml | 6 +++--- CHANGES.md | 6 +++--- README.md | 2 +- docs/filtering_configuration.md | 2 +- docs/mirror_configuration.md | 2 +- src/bandersnatch_storage_plugins/swift.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bd3378ba8..ac58c3622 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: args: [--target-version, py311, --preview] - repo: https://github.com/asottile/pyupgrade - rev: v3.18.0 + rev: v3.19.1 hooks: - id: pyupgrade args: [--py311-plus] @@ -27,7 +27,7 @@ repos: - id: isort - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.14.0 hooks: - id: mypy exclude: (docs/.*) @@ -40,7 +40,7 @@ repos: additional_dependencies: [flake8-bugbear] - repo: https://github.com/executablebooks/mdformat - rev: 0.7.18 + rev: 0.7.21 hooks: - id: mdformat additional_dependencies: diff --git a/CHANGES.md b/CHANGES.md index eed525189..d62de46c5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -248,10 +248,10 @@ Thanks to RedHat engineers **@dalley** + **@gerrod3** for all this refactor work ## Internal API Changes -- Old Mirror class has been renamed to BandersnatchMirror. Performs same functionality with use of new Mirror API. +- Old Mirror class has been renamed to BandersnatchMirror. Performs same functionality with use of new Mirror API. - BandersnatchMirror now performs all filesystem operations throughout the sync process including the ones previously in Package. -- Package no longer performs filesystem operations. Properties `json_file`, `json_pypi_symlink`, `simple_directory` +- Package no longer performs filesystem operations. Properties `json_file`, `json_pypi_symlink`, `simple_directory` and methods `save_json_metadata`, `sync_release_files`, `gen_data_requires_python`, `generate_simple_page`, `sync_simple_page`, `_save_simple_page_version`, `_prepare_versions_path`, `_file_url_to_local_url`, `_file_url_to_local_path`, `download_file` have all been moved into BandersnatchMirror. Package's `sync` has been @@ -369,7 +369,7 @@ Thanks to RedHat engineers **@dalley** + **@gerrod3** for all this refactor work # 3.3.0 (2019-04-11) - Add latest version and specific platform plugins - `Fixes #49` - Thanks **@rene-d** -- Generate data-requires-python attributes in index.html - `Fixes #68` - Thanks **@z4yx** +- Generate data-requires-python attributes in index.html - `Fixes #68` - Thanks **@z4yx** - Make package filtering logging less noisy when disabled - `Fixes #146` - Many pyup.io dependency upgrades diff --git a/README.md b/README.md index c464de407..e0738b01a 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ limitation of 32k sub-directories. #### Client Compatibility -A bandersnatch static mirror is compatible only to the "static", cacheable +A bandersnatch static mirror is compatible only to the "static", cacheable parts of PyPI that are needed to support package installation. It does not support more dynamic APIs of PyPI that maybe be used by various clients for other purposes. diff --git a/docs/filtering_configuration.md b/docs/filtering_configuration.md index fa89f8027..c530408f0 100644 --- a/docs/filtering_configuration.md +++ b/docs/filtering_configuration.md @@ -45,7 +45,7 @@ enabled = ## allowlist / blocklist filtering settings -The blocklist / allowlist settings are in configuration sections named **\[blocklist\]** and **\[allowlist\]** +The blocklist / allowlist settings are in configuration sections named **[blocklist]** and **[allowlist]** these section provides settings to indicate packages, projects and releases that should / should not be mirrored from PyPI. diff --git a/docs/mirror_configuration.md b/docs/mirror_configuration.md index b080227dd..215772904 100644 --- a/docs/mirror_configuration.md +++ b/docs/mirror_configuration.md @@ -1,6 +1,6 @@ # Mirror Configuration -The **\[mirror\]** section of the configuration file contains general options for how Bandersnatch should operate. This includes settings like the source repository to mirror, how to store mirrored files, and the kinds of files to include in the mirror. +The **[mirror]** section of the configuration file contains general options for how Bandersnatch should operate. This includes settings like the source repository to mirror, how to store mirrored files, and the kinds of files to include in the mirror. The following options are currently _required_: diff --git a/src/bandersnatch_storage_plugins/swift.py b/src/bandersnatch_storage_plugins/swift.py index c0ad9d0fd..229ebd789 100644 --- a/src/bandersnatch_storage_plugins/swift.py +++ b/src/bandersnatch_storage_plugins/swift.py @@ -779,7 +779,7 @@ def open_file( """Yield a file context to iterate over. If text is false, open the file with 'rb' mode specified.""" wrapper = io.StringIO if text else io.BytesIO - content: IO = wrapper(self.read_file(path, text=text)) + content: IO = wrapper(self.read_file(path, text=text)) # type: ignore yield content def read_file(