sync-pre-commit-deps 0.0.2__tar.gz → 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: sync_pre_commit_deps
3
- Version: 0.0.2
4
- Summary: apply a consistent format to `setup.cfg` files
5
- Home-page: https://github.com/mxr/sync-pre-commit-deps
3
+ Version: 0.0.3
4
+ Summary: Sync pre-commit hook dependencies based on other installed hooks
5
+ Home-page: https://github.com/pre-commit/sync-pre-commit-deps
6
6
  Author: Max R
7
7
  Author-email: maxr@outlook.com
8
8
  License: MIT
@@ -34,8 +34,8 @@ See [pre-commit](https://github.com/pre-commit/pre-commit) for instructions
34
34
  Sample `.pre-commit-config.yaml`:
35
35
 
36
36
  ```yaml
37
- - repo: https://github.com/mxr/sync-pre-commit-deps
38
- rev: v0.0.2
37
+ - repo: https://github.com/pre-commit/sync-pre-commit-deps
38
+ rev: v0.0.3
39
39
  hooks:
40
40
  - id: sync-pre-commit-deps
41
41
  ```
@@ -16,8 +16,8 @@ See [pre-commit](https://github.com/pre-commit/pre-commit) for instructions
16
16
  Sample `.pre-commit-config.yaml`:
17
17
 
18
18
  ```yaml
19
- - repo: https://github.com/mxr/sync-pre-commit-deps
20
- rev: v0.0.2
19
+ - repo: https://github.com/pre-commit/sync-pre-commit-deps
20
+ rev: v0.0.3
21
21
  hooks:
22
22
  - id: sync-pre-commit-deps
23
23
  ```
@@ -1,10 +1,10 @@
1
1
  [metadata]
2
2
  name = sync_pre_commit_deps
3
- version = 0.0.2
4
- description = apply a consistent format to `setup.cfg` files
3
+ version = 0.0.3
4
+ description = Sync pre-commit hook dependencies based on other installed hooks
5
5
  long_description = file: README.md
6
6
  long_description_content_type = text/markdown
7
- url = https://github.com/mxr/sync-pre-commit-deps
7
+ url = https://github.com/pre-commit/sync-pre-commit-deps
8
8
  author = Max R
9
9
  author_email = maxr@outlook.com
10
10
  license = MIT
@@ -1,8 +1,8 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: sync_pre_commit_deps
3
- Version: 0.0.2
4
- Summary: apply a consistent format to `setup.cfg` files
5
- Home-page: https://github.com/mxr/sync-pre-commit-deps
3
+ Version: 0.0.3
4
+ Summary: Sync pre-commit hook dependencies based on other installed hooks
5
+ Home-page: https://github.com/pre-commit/sync-pre-commit-deps
6
6
  Author: Max R
7
7
  Author-email: maxr@outlook.com
8
8
  License: MIT
@@ -34,8 +34,8 @@ See [pre-commit](https://github.com/pre-commit/pre-commit) for instructions
34
34
  Sample `.pre-commit-config.yaml`:
35
35
 
36
36
  ```yaml
37
- - repo: https://github.com/mxr/sync-pre-commit-deps
38
- rev: v0.0.2
37
+ - repo: https://github.com/pre-commit/sync-pre-commit-deps
38
+ rev: v0.0.3
39
39
  hooks:
40
40
  - id: sync-pre-commit-deps
41
41
  ```
@@ -53,12 +53,13 @@ def main(argv: Sequence[str] | None = None) -> int:
53
53
  # TODO - validate schema?
54
54
  versions = {}
55
55
  for repo in loaded['repos']:
56
- for hook in repo['hooks']:
57
- if (hid := hook['id']) in SUPPORTED:
58
- # `mirrors-mypy` uses versions with a 'v' prefix, so we have to
59
- # strip it out to get the mypy version.
60
- cleaned_rev = repo['rev'].removeprefix('v')
61
- versions[hid] = cleaned_rev
56
+ if repo['repo'] not in ('local', 'meta'):
57
+ for hook in repo['hooks']:
58
+ if (hid := hook['id']) in SUPPORTED:
59
+ # `mirrors-mypy` uses versions with a 'v' prefix, so we
60
+ # have to strip it out to get the mypy version.
61
+ cleaned_rev = repo['rev'].removeprefix('v')
62
+ versions[hid] = cleaned_rev
62
63
 
63
64
  updated = []
64
65
  for repo in loaded['repos']: