-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove unused imports (#11)
* refactor: remove unused imports An object has been imported but is not used anywhere in the file. It should either be used or the import should be removed. * other fixes * style: format code with Black and isort This commit fixes the style issues introduced in f2740df according to the output from Black and isort. Details: #11 --------- Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> Co-authored-by: Heitor Polidoro <[email protected]>
- Loading branch information
1 parent
b6a5940
commit 17593e3
Showing
3 changed files
with
22 additions
and
33 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 |
---|---|---|
@@ -1,27 +1 @@ | ||
import os | ||
import pathlib | ||
|
||
import pytest | ||
from cryptography.hazmat.backends import default_backend as crypto_default_backend | ||
from cryptography.hazmat.primitives import serialization as crypto_serialization | ||
from cryptography.hazmat.primitives.asymmetric import rsa | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def private_key(): | ||
if os.path.exists("private-key.pem"): | ||
return pathlib.Path("private-key.pem").read_text() | ||
key = rsa.generate_private_key( | ||
backend=crypto_default_backend(), public_exponent=65537, key_size=2048 | ||
) | ||
|
||
return key.private_bytes( | ||
crypto_serialization.Encoding.PEM, | ||
crypto_serialization.PrivateFormat.PKCS8, | ||
crypto_serialization.NoEncryption(), | ||
).decode() | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def vcr_cassette_name(request): | ||
return "github_requests.yaml" |