File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Creates PRs for dependency updates in python projects.
1616- [x] Get dependencies from pre-commit
1717- [x] Github auth & async
1818- [x] Create dependency abstract class
19- - [ ] Use get_dependency
19+ - [x ] Use get_dependency
2020- [ ] Implement CLI
2121- [x] Create changes to files
2222- [ ] Create pull request
Original file line number Diff line number Diff line change @@ -137,13 +137,11 @@ def check_dependency(
137137 gh_pat = GH_PAT ,
138138 )
139139
140- for d in project .dependencies :
141- if d .package_name == dependency :
142- dep = d
143- break
144- else :
140+ try :
141+ dep = project .get_dependency (name = dependency )
142+ except RuntimeError as e :
145143 rprint (f"Cannot find { dependency } in { project .name } ." )
146- raise typer .Exit (code = 1 )
144+ raise typer .Exit (code = 1 ) from e
147145
148146 asyncio .run (dep .save_data ())
149147
You can’t perform that action at this time.
0 commit comments