Skip to content

Commit

Permalink
v1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-C committed Sep 17, 2021
1 parent 7fdb07b commit c20e8a8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ repos:
- --rcfile=.pylintrc
- --reports=no
- repo: git://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.2.1
rev: v1.2.2
hooks:
- id: python-safety-dependencies-check
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/),
and [PEP 440](https://www.python.org/dev/peps/pep-0440/).


## [1.2.2] - 2021-09-17
### Fixed
- package manager detection now allows for a comment at the end of the line `[tool.poetry]` in `pyproject.toml`

## [1.2.1] - 2021-01-29
### Added
- support for `pyproject.toml` files using `poetry`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Releases details: [CHANGELOG.md](CHANGELOG.md)
## Usage
```
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.2.1
rev: v1.2.2
hooks:
- id: python-safety-dependencies-check
```
Expand Down
2 changes: 1 addition & 1 deletion pre_commit_hooks/safety_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def main(argv=None): # pylint: disable=inconsistent-return-statements
pyproject_toml_filepath = files[0]
with pyproject_toml_filepath.open() as pyproject_file:
lines = [line.strip() for line in pyproject_file.readlines()]
if "[tool.poetry]" in lines:
if any(line.startswith("[tool.poetry]") for line in lines):
with convert_poetry_to_requirements(pyproject_toml_filepath) as tmp_requirements:
return call_safety_check([tmp_requirements.name], parsed_args.ignore, parsed_args.full_report, args_rest)
parser.error("Unsupported build tool: this pre-commit hook currently only handles pyproject.toml with Poetry")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name='pre-commit-hooks-safety',
description='A pre-commit hook to check your Python dependencies against safety-db',
url='https://github.com/Lucas-C/pre-commit-hooks-safety',
version='1.2.1',
version='1.2.2',
author='Lucas Cimon',
author_email='[email protected]',
classifiers=[
Expand Down

0 comments on commit c20e8a8

Please sign in to comment.