diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a251a16..45ad126 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: - id: check-case-conflict - id: detect-private-key - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.3" + rev: "v3.1.0" hooks: - id: prettier types_or: @@ -36,10 +36,10 @@ repos: exclude: "(^Pipfile\\.lock$)" # Python hooks - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.1.4' + rev: 'v0.2.1' hooks: - id: ruff - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.10.1 + rev: 24.1.1 hooks: - id: black diff --git a/.ruff.toml b/.ruff.toml index d230ad2..c766915 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -1,6 +1,4 @@ # https://beta.ruff.rs/docs/settings/ -# https://beta.ruff.rs/docs/rules/ -extend-select = ["I", "W", "UP", "COM", "EXE", "ISC", "ICN", "G201", "INP", "PIE", "RSE", "SIM", "TID", "PLC", "PLE", "RUF", "PTH"] fix = true line-length = 110 respect-gitignore = true @@ -8,5 +6,9 @@ target-version = "py310" output-format = "grouped" show-fixes = true -[isort] +[lint] +# https://docs.astral.sh/ruff/rules/ +extend-select = ["F", "E", "W", "I", "UP", "COM", "EXE", "ISC", "ICN", "G201", "INP", "PIE", "RSE", "SIM", "TID", "PLC", "PLE", "RUF", "PTH"] + +[lint.isort] force-single-line = true diff --git a/github/packages.py b/github/packages.py index 15f8b5a..7c872a5 100644 --- a/github/packages.py +++ b/github/packages.py @@ -184,8 +184,8 @@ class GithubContainerRegistryOrgApi(_GithubContainerRegistryApiBase): PACKAGE_VERSIONS_ENDPOINT = ( "/orgs/{ORG}/packages/{PACKAGE_TYPE}/{PACKAGE_NAME}/versions" ) - PACKAGE_VERSION_DELETE_ENDPOINT = "/orgs/{ORG}/packages/{PACKAGE_TYPE}/{PACKAGE_NAME}/versions/{PACKAGE_VERSION_ID}" - PACKAGE_VERSION_RESTORE_ENDPOINT = "/orgs/{ORG}/packages/{PACKAGE_TYPE}/{PACKAGE_NAME}/versions/{PACKAGE_VERSION_ID}/restore" + PACKAGE_VERSION_DELETE_ENDPOINT = "/orgs/{ORG}/packages/{PACKAGE_TYPE}/{PACKAGE_NAME}/versions/{PACKAGE_VERSION_ID}" # noqa: E501 + PACKAGE_VERSION_RESTORE_ENDPOINT = "/orgs/{ORG}/packages/{PACKAGE_TYPE}/{PACKAGE_NAME}/versions/{PACKAGE_VERSION_ID}/restore" # noqa: E501 class GithubContainerRegistryUserApi(_GithubContainerRegistryApiBase): @@ -199,4 +199,4 @@ class GithubContainerRegistryUserApi(_GithubContainerRegistryApiBase): PACKAGE_VERSION_DELETE_ENDPOINT = ( "/user/packages/{PACKAGE_TYPE}/{PACKAGE_NAME}/versions/{PACKAGE_VERSION_ID}" ) - PACKAGE_VERSION_RESTORE_ENDPOINT = "/user/packages/{PACKAGE_TYPE}/{PACKAGE_NAME}/versions/{PACKAGE_VERSION_ID}/restore" + PACKAGE_VERSION_RESTORE_ENDPOINT = "/user/packages/{PACKAGE_TYPE}/{PACKAGE_NAME}/versions/{PACKAGE_VERSION_ID}/restore" # noqa: E501