Skip to content

Commit

Permalink
bump swp version to 0.2.1
Browse files Browse the repository at this point in the history
* bump dependencies and hooks
* fix quoted revs handling (close #8)
* update VSCode settings
  • Loading branch information
floatingpurr committed May 31, 2022
1 parent 9d91e6f commit b447d2e
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:

# general checks (see here: https://pre-commit.com/hooks.html)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.2.0
hooks:
- id: check-added-large-files
- id: check-json
Expand Down Expand Up @@ -47,13 +47,13 @@ repos:

# mypy - lint-like type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.942
rev: v0.960
hooks:
- id: mypy
additional_dependencies: [types-pyyaml==6.0.1]

# prettier - formatting JS, CSS, JSON, Markdown, ...
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.1
rev: v2.6.2
hooks:
- id: prettier
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"python.pythonPath": ".venv/bin/python",
"python.formatting.provider": "black",
"editor.formatOnSave": true,
"python.linting.enabled": true,
Expand Down
52 changes: 26 additions & 26 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Andrea <[email protected]>"]
description = ""
name = "sync_with_poetry"
version = "0.1.1"
version = "0.2.1"

[tool.poetry.dependencies]
python = "^3.6"
Expand All @@ -13,7 +13,7 @@ tomlkit = "^0.7.2"
[tool.poetry.dev-dependencies]
black = {version = "^22.3.0", python = "^3.6.2"}
flake8 = "^4.0.1"
mypy = "^0.942"
mypy = "^0.960"
pre-commit = {version = "^2.15.0", python = "^3.6.1"}
pytest = "^6.2"
pytest-cov = "^3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion sync_with_poetry/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.1"
__version__ = "0.2.1"
4 changes: 2 additions & 2 deletions sync_with_poetry/swp.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ def sync_repos(

assert match is not None

if pre_commit_repo.rev == match[4]:
if pre_commit_repo.rev == match[4].replace('"', "").replace("'", ""):
continue

new_rev_s = yaml.dump({"rev": pre_commit_repo.rev}, default_style=match[3])
new_rev = new_rev_s.split(":", 1)[1].strip()
lines[idx] = f"{match[1]}rev:{match[2]}{new_rev}{match[5]}{match[6]}"
print(
f"[{pre_commit_repo.name}] {pre_commit_repo.repo} -> rev: {pre_commit_repo.rev}"
f"[{pre_commit_repo.name}] {pre_commit_repo.repo}pyton -> rev: {pre_commit_repo.rev}"
)
retv |= 1

Expand Down
2 changes: 1 addition & 1 deletion tests/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

def test_version() -> None:
"""Test version"""
assert __version__ == "0.1.1"
assert __version__ == "0.2.1"

0 comments on commit b447d2e

Please sign in to comment.