Skip to content

Commit

Permalink
Add sqlalchemy to pre-commit dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Mar 1, 2023
1 parent 59d57d3 commit b4b8dde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ repos:
- types-requests==2.28.11.15
- types-tabulate==0.9.0.1
- types-python-dateutil==2.8.19.9
- SQLAlchemy==2.0.4
# stages: [push]

- repo: https://github.com/pycqa/isort
Expand Down
7 changes: 6 additions & 1 deletion build_helpers/pre_commit_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@

pre_commit_file = Path('.pre-commit-config.yaml')
require_dev = Path('requirements-dev.txt')
require = Path('requirements.txt')

with require_dev.open('r') as rfile:
requirements = rfile.readlines()

with require.open('r') as rfile:
requirements.extend(rfile.readlines())

# Extract types only
type_reqs = [r.strip('\n') for r in requirements if r.startswith('types-')]
type_reqs = [r.strip('\n') for r in requirements if r.startswith(
'types-') or r.startswith('SQLAlchemy')]

with pre_commit_file.open('r') as file:
f = yaml.load(file, Loader=yaml.FullLoader)
Expand Down

0 comments on commit b4b8dde

Please sign in to comment.