aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/pytest/py3/_pytest/pastebin.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2025-05-05 12:31:52 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2025-05-05 12:41:33 +0300
commit6ff49ec58061f642c3a2f83c61eba12820787dfc (patch)
treec733ec9bdb15ed280080d31dea8725bfec717acd /contrib/python/pytest/py3/_pytest/pastebin.py
parenteefca8305c6a545cc6b16dca3eb0d91dcef2adcd (diff)
downloadydb-6ff49ec58061f642c3a2f83c61eba12820787dfc.tar.gz
Intermediate changes
commit_hash:8b3bb826b17db8329ed1221f545c0645f12c552d
Diffstat (limited to 'contrib/python/pytest/py3/_pytest/pastebin.py')
-rw-r--r--contrib/python/pytest/py3/_pytest/pastebin.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/python/pytest/py3/_pytest/pastebin.py b/contrib/python/pytest/py3/_pytest/pastebin.py
index 22c7a622373..06b1f9ca99d 100644
--- a/contrib/python/pytest/py3/_pytest/pastebin.py
+++ b/contrib/python/pytest/py3/_pytest/pastebin.py
@@ -1,15 +1,16 @@
"""Submit failure or test session information to a pastebin service."""
-import tempfile
+
from io import StringIO
+import tempfile
from typing import IO
from typing import Union
-import pytest
from _pytest.config import Config
from _pytest.config import create_terminal_writer
from _pytest.config.argparsing import Parser
from _pytest.stash import StashKey
from _pytest.terminal import TerminalReporter
+import pytest
pastebinfile_key = StashKey[IO[bytes]]()
@@ -73,8 +74,8 @@ def create_new_paste(contents: Union[str, bytes]) -> str:
:returns: URL to the pasted contents, or an error message.
"""
import re
- from urllib.request import urlopen
from urllib.parse import urlencode
+ from urllib.request import urlopen
params = {"code": contents, "lexer": "text", "expiry": "1week"}
url = "https://bpa.st"