Skip to content

Commit

Permalink
Merge branch 'main' into speed_up_process_thread
Browse files Browse the repository at this point in the history
  • Loading branch information
amyreese committed Feb 20, 2024
2 parents acf9d41 + dd37348 commit 89f5f23
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: pyproject.toml
Expand Down
16 changes: 7 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

## Preparation

You'll need to have at least Python 3.5 available for testing.
Python 3.6 or newer is recommended in order to validate formatting.
You'll need to have at least Python 3.8 available for testing.

You can do this with [pyenv][]:

$ pyenv install 3.6.10
$ pyenv local 3.6.10
$ pyenv install <version>
$ pyenv local <version>


## Setup
Expand All @@ -23,9 +22,9 @@ install the appropriate tools and dependencies:

## Formatting

aiosqlite uses *[black][]* and [isort][] for formatting code
and imports, respectively. If your editor does not already
support this workflow, you can manually format files:
aiosqlite uses *[ufmt][]* for formatting code and imports.
If your editor does not already support this workflow,
you can manually format files:

$ make format

Expand All @@ -50,6 +49,5 @@ that you have done the following:
* Formatted code following project standards
* Validated code and formatting with `make test lint`

[black]: https://github.com/psf/black
[isort]: https://timothycrosley.github.io/isort/
[pyenv]: https://github.com/pyenv/pyenv
[µfmt]: https://ufmt.omnilib.dev
2 changes: 1 addition & 1 deletion aiosqlite/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def run(self) -> None:
result = function()
LOG.debug("operation %s completed", function)
future.get_loop().call_soon_threadsafe(set_result, future, result)
except BaseException as e:
except BaseException as e: # noqa B036
LOG.debug("returning exception %s", e)
future.get_loop().call_soon_threadsafe(set_exception, future, e)

Expand Down
3 changes: 1 addition & 2 deletions aiosqlite/tests/smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,7 @@ async def test_connect_error(self):
self.assertIsNone(db) # should never be reached

with self.assertRaisesRegex(OperationalError, "unable to open database"):
db = await aiosqlite.connect(bad_db)
self.assertIsNone(db) # should never be reached
await aiosqlite.connect(bad_db)

async def test_iterdump(self):
async with aiosqlite.connect(":memory:") as db:
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ dependencies = [
dev = [
"attribution==1.6.2",
"black==23.3.0",
"coverage[toml]==7.2.5",
"coverage[toml]==7.4.1",
"flake8==6.0.0",
"flake8-bugbear==23.3.23",
"flake8-bugbear==24.2.6",
"flit==3.8.0",
"mypy==1.2.0",
"ufmt==2.1.0",
"mypy==1.8.0",
"ufmt==2.3.0",
"usort==1.0.7",
]
docs = [
"sphinx==7.0.0",
"sphinx==7.2.6",
"sphinx-mdinclude==0.5.3",
]

Expand Down

0 comments on commit 89f5f23

Please sign in to comment.