Skip to content

Commit

Permalink
feat(readme): automatically update example pre-commit version (#104)
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Craigie <robert@craigie.dev>
  • Loading branch information
demberto and RobertCraigie committed Oct 26, 2022
1 parent ff13b8a commit e7a11f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -39,7 +39,7 @@ You can also setup pyright to run automatically before each commit by setting up
```yaml
repos:
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.237
rev: v1.1.277
hooks:
- id: pyright
```
Expand Down
5 changes: 5 additions & 0 deletions version.py
Expand Up @@ -34,6 +34,11 @@ def set_pyright_ver(ver: str):
)
print(line)

with fileinput.input('README.md', inplace=True) as f:
for line in f:
line = re.sub(r'rev: v(.*)', f'rev: v{ver}', line.rstrip())
print(line)


if __name__ == "__main__":
# create a parser object
Expand Down

0 comments on commit e7a11f0

Please sign in to comment.