Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#869)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/PyCQA/autoflake: v2.0.0 → v2.0.1](PyCQA/autoflake@v2.0.0...v2.0.1)
- [github.com/psf/black: 22.12.0 → 23.1.0](psf/black@22.12.0...23.1.0)
- [github.com/asottile/blacken-docs: v1.12.1 → 1.13.0](adamchainz/blacken-docs@v1.12.1...1.13.0)

* Update .pre-commit-config.yaml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and nicoddemus authored Feb 7, 2023
1 parent 9373ddb commit c695763
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
repos:
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
rev: v2.0.1
hooks:
- id: autoflake
args: ["--in-place", "--remove-unused-variables", "--remove-all-unused-imports"]
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
args: [--safe, --quiet, --target-version, py35]
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.13.0
hooks:
- id: blacken-docs
additional_dependencies: [black==20.8b1]
additional_dependencies: [black==23.1.0]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ a test or fixture, you may use the ``worker_id`` fixture to do so:
@pytest.fixture()
def user_account(worker_id):
""" use a different account in each xdist worker """
"""use a different account in each xdist worker"""
return "account_%s" % worker_id
When ``xdist`` is disabled (running with ``-n0`` for example), then
Expand Down Expand Up @@ -80,7 +80,7 @@ wanted to create a separate database for each test run:
@pytest.fixture(scope="session", autouse=True)
def create_unique_database(testrun_uid):
""" create a unique database for this particular test run """
"""create a unique database for this particular test run"""
database_url = f"psql://myapp-{testrun_uid}"
with Semaphore(f"/{testrun_uid}-lock", flags=O_CREAT, initial_value=1):
Expand All @@ -90,7 +90,7 @@ wanted to create a separate database for each test run:
@pytest.fixture()
def db(testrun_uid):
""" retrieve unique database """
"""retrieve unique database"""
database_url = f"psql://myapp-{testrun_uid}"
return database_get_instance(database_url)
Expand Down
1 change: 0 additions & 1 deletion src/xdist/looponfail.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def pytest_addoption(parser):

@pytest.hookimpl
def pytest_cmdline_main(config):

if config.getoption("looponfail"):
usepdb = config.getoption("usepdb", False) # a core option
if usepdb:
Expand Down
2 changes: 0 additions & 2 deletions src/xdist/scheduler/loadscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,11 @@ def add_node_collection(self, node, collection):

# A new node has been added later, perhaps an original one died.
if self.collection_is_completed:

# Assert that .schedule() should have been called by now
assert self.collection

# Check that the new collection matches the official collection
if collection != self.collection:

other_node = next(iter(self.registered_collections.keys()))

msg = report_collection_diff(
Expand Down

0 comments on commit c695763

Please sign in to comment.