Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy committed Nov 8, 2024
1 parent 4e541be commit c918e3d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/unit/vcr.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import re
from pathlib import Path
from typing import Any

import vcr
from pytest import FixtureRequest
from vcr.cassette import Cassette


class CustomVCR(vcr.VCR):
class CustomVCR(vcr.VCR): # type: ignore[misc]
def __init__(
self,
request: FixtureRequest,
Expand All @@ -31,7 +30,7 @@ def use_cassette(self, **kwargs: Any) -> Cassette:
module_name = self._request.node.module.__name__.split(".")[-1]
test_name = self._request.node.name
file_name_parts.append(_remove_parameters(test_name))
test_file_path = Path(str(self._request.fspath))
test_file_path = self._request.path
path = (
test_file_path.parent / "cassettes" / module_name / f'{".".join(file_name_parts)}.yaml'
)
Expand Down

0 comments on commit c918e3d

Please sign in to comment.