-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update project to python 3.11 and new linting
Why these changes are being introduced: We are systematically moving through our python applications and updating the python version, linting configurations, and some other general scaffolding. With this project likely touched for some upcoming projects, it was decided to update in advance of that work. How this addresses that need: * bumps python version to 3.11 * adds ruff and pyproject.toml approach to linting * code style and conventions updated to match new linting rules Side effects of this change: The python version was updated from 3.10 to 3.11. Tests have completed fine and testing will be performed in Dev1, but majoy python versions always come with some risk of unintended changes. Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/IN-894
- Loading branch information
Showing
20 changed files
with
812 additions
and
829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
default_language_version: | ||
python: python3.11 # set for project python version | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: black-apply | ||
name: black-apply | ||
entry: pipenv run black | ||
language: system | ||
pass_filenames: true | ||
types: ["python"] | ||
- id: mypy | ||
name: mypy | ||
entry: pipenv run mypy | ||
language: system | ||
pass_filenames: true | ||
types: ["python"] | ||
exclude: "tests/" | ||
- id: ruff-apply | ||
name: ruff-apply | ||
entry: pipenv run ruff check --fix | ||
language: system | ||
pass_filenames: true | ||
types: ["python"] | ||
- id: safety | ||
name: safety | ||
entry: pipenv check | ||
language: system | ||
pass_filenames: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.10.10 | ||
3.11.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.