Skip to content

Commit

Permalink
Updates to the latest format of Ruff configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpylog committed Feb 6, 2024
1 parent c0955d7 commit f424dac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
8 changes: 5 additions & 3 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# 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
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
6 changes: 3 additions & 3 deletions github/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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

0 comments on commit f424dac

Please sign in to comment.