Skip to content

Commit

Permalink
Upgrade pre-commit dependencies
Browse files Browse the repository at this point in the history
* chore: hande upgrades

Was originally in #1172

Also:

- [x] remove safe option from pyproject black config
  - it is the default, so no need to state, stop config error notification
  - `fast` is the non-default option and works when added to config without
    error ([docs](https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#fast-safe))
- [x] add venv to excluding directories (most devs set their virtualenv to venv or .venv)

Signed-off-by: jmeridth <jmeridth@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: jmeridth <jmeridth@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
jmeridth and pre-commit-ci[bot] committed Mar 21, 2024
1 parent 442d783 commit 3ae8761
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ Source = "https://github.com/sigmavirus24/github3.py"
[tool.black]
line-length = 78
target-version = ['py37']
safe = true
exclude = '''
(
/(
Expand All @@ -83,6 +82,7 @@ exclude = '''
| _build
| build
| dist
| venv
)/
)
'''
Expand Down
6 changes: 3 additions & 3 deletions src/github3/repos/branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ def protect(
if allow_deletions is not None:
edit["allow_deletions"] = allow_deletions
if required_conversation_resolution is not None:
edit[
"required_conversation_resolution"
] = required_conversation_resolution
edit["required_conversation_resolution"] = (
required_conversation_resolution
)
url = self._build_url("protection", base_url=self._api)
resp = self._put(url, json=edit)
json = self._json(resp, 200)
Expand Down

0 comments on commit 3ae8761

Please sign in to comment.