-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various minor updates #14
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
188db8d
Update copyright year
tomkins 5f21b0b
Drop support for Python 3.7
tomkins 5d41c2a
Tweak tox.ini
tomkins 2a863d2
Add support for Python 3.12
tomkins 425c4ee
Minor package updates
tomkins 96d2168
Use tox-uv
tomkins 33d585f
Switch to ruff
tomkins ff70722
Test with psycopg v3 for newer versions of Django
tomkins 683f505
CI package bump
tomkins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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,15 +1,31 @@ | ||
[tool.black] | ||
[tool.ruff] | ||
line-length = 99 | ||
target-version = ['py37'] | ||
exclude = '/migrations/' | ||
target-version = 'py38' | ||
|
||
[tool.isort] | ||
combine_as_imports = true | ||
sections = ['FUTURE','STDLIB','DJANGO','THIRDPARTY','FIRSTPARTY','LOCALFOLDER'] | ||
known_django = 'django' | ||
include_trailing_comma = true | ||
float_to_top = true | ||
force_grid_wrap = 0 | ||
line_length = 99 | ||
multi_line_output = 3 | ||
skip_glob = '*/migrations/*.py' | ||
[tool.ruff.lint] | ||
select = [ | ||
'F', # pyflakes | ||
'E', # pycodestyle | ||
'W', # pycodestyle | ||
'I', # isort | ||
'N', # pep8-naming | ||
'UP', # pyupgrade | ||
'S', # flake8-bandit | ||
'BLE', # flake8-blind-except | ||
'C4', # flake8-comprehensions | ||
'EM', # flake8-errmsg | ||
'T20', # flake8-print | ||
'RET', # flake8-return | ||
'RUF', # ruff | ||
] | ||
ignore = [ | ||
'EM101', # flake8-errmsg: raw-string-in-exception | ||
] | ||
|
||
[tool.ruff.lint.isort] | ||
combine-as-imports = true | ||
|
||
[tool.ruff.lint.pep8-naming] | ||
extend-ignore-names = [ | ||
'assert*', | ||
] |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
black==24.3.0 ; python_version >= '3.8' | ||
coverage==7.2.7 | ||
flake8==6.0.0 ; python_version >= '3.8' | ||
isort==5.12.0 ; python_version >= '3.8' | ||
pipdeptree==2.9.0 | ||
coverage==7.6.1 | ||
pipdeptree==2.23.3 | ||
ruff==0.6.5 |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's safe here - but would it be best practice (?) to use the psycopg2.sql functions for string building?
where
self.unlock_function
would be asql.Identifier()
rather than a plain string??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One to ponder on - seems like a good idea.
Only slight downside is that this package would then technically require psycopg2 or psycopg directly (which currently we don't!)