Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/topic/bbannier/pre-commit-py-ver…
Browse files Browse the repository at this point in the history
…sion'

* origin/topic/bbannier/pre-commit-py-version:
  Use default Python version for GH pre-commit workflow
  Bump pyupgrade pre-commit to latest version
  • Loading branch information
timwoj committed Mar 12, 2024
2 parents 0b99a94 + 57aaee0 commit 3ee29db
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/pre-commit.yml
Expand Up @@ -11,6 +11,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- uses: pre-commit/action@v3.0.0
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -15,7 +15,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.15.1
hooks:
- id: pyupgrade
args: ["--py37-plus"]
Expand Down
13 changes: 13 additions & 0 deletions CHANGES
@@ -1,3 +1,16 @@
3.0.1-6 | 2024-03-12 11:09:28 -0700

* Use default Python version for GH pre-commit workflow (Benjamin Bannier, Corelight)

I am unsure why we pinned this to the concrete version in the initial
commit. Looking at it now pinning a linting workflow to e.g., our
minimal Python version seems to make no sense as it does not actually
run any code. Additionally it introduces a requirement of all pre-commit
hooks working with our lowest possible version; this is not the case for
e.g., `pyupgrade` which requires python-3.8 now.

* Bump pyupgrade pre-commit to latest version (Tim Wojtulewicz, Corelight)

3.0.1-3 | 2024-03-01 15:48:40 -0700

* Extend recognition of local Git repos (Benjamin Bannier, Corelight)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
3.0.1-3
3.0.1-6
2 changes: 1 addition & 1 deletion doc/man/zkg.1
Expand Up @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "ZKG" "1" "Mar 01, 2024" "3.0.1-3" "Zeek Package Manager"
.TH "ZKG" "1" "Mar 12, 2024" "3.0.1-6" "Zeek Package Manager"
.SH NAME
zkg \- Zeek Package Manager
.sp
Expand Down
2 changes: 1 addition & 1 deletion zeekpkg/__init__.py
Expand Up @@ -9,7 +9,7 @@

import logging

__version__ = "3.0.1-3"
__version__ = "3.0.1-6"
__all__ = ["manager", "package", "source", "template", "uservar"]

LOG = logging.getLogger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions zeekpkg/manager.py
Expand Up @@ -363,7 +363,7 @@ def __init__(
# We try to remove the old bin_dir. That may not succeed in case
# it wasn't actually managed by us, but that's ok.
os.rmdir(prev_bin_dir)
except os.error:
except OSError:
pass

if need_manifest_update:
Expand Down Expand Up @@ -1362,7 +1362,7 @@ def remove(self, pkg_path):
try:
LOG.debug("removing link %s", link)
os.unlink(link)
except os.error as err:
except OSError as err:
LOG.warn("cannot remove link for %s", err)

del self.installed_pkgs[pkg_to_remove.name]
Expand Down

0 comments on commit 3ee29db

Please sign in to comment.