"""simple docstring"""







# tests directory-specific settings - this file is run automatically
# by pytest before any tests are run

import sys
import warnings
from os.path import abspath, dirname, join


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
_a					:					str=			abspath(join(dirname(dirname(dirname(__file__))), "src"))
sys.path.insert(1, git_repo_path)


# silence FutureWarning warnings in tests since often we can't act on them until
# they become normal warnings - i.e. the tests still need to test the current functionality
warnings.simplefilter(action="ignore", category=FutureWarning)
def   __UpperCAmelCase    (   UpperCAmelCase_   :    Dict  )							->      List[str]:

	'''simple docstring'''





	from transformers.testing_utils import pytest_addoption_shared

	pytest_addoption_shared(snake_case__  )

def   __UpperCAmelCase    (   UpperCAmelCase_   :    List[Any]  )							->      Dict:

	'''simple docstring'''





	from transformers.testing_utils import pytest_terminal_summary_main

	__snake_case      :							Optional[int]						=			terminalreporter.config.getoption('--make-reports'  )
	if make_reports:
		pytest_terminal_summary_main(snake_case__      ,							id=snake_case__  )






"""simple docstring"""







from __future__ import annotations

import os
from typing import Any

import requests

_a					:					int=			"https://api.github.com"

# https://docs.github.com/en/free-pro-team@latest/rest/reference/users#get-the-authenticated-user
_a					:					Dict=			BASE_URL + "/user"

# https://github.com/settings/tokens
_a					:					Union[str, Any]=			os.environ.get("USER_TOKEN", "")
def   __UpperCAmelCase    (   UpperCAmelCase_   :    str  )							->      dict[Any, Any]:

	'''simple docstring'''





	__snake_case      :							Tuple						=			{
	    'Authorization': F"token {auth_token}",
	    'Accept': 'application/vnd.github.v3+json',
	}
	return requests.get(UpperCAmelCase_      ,							headers=UpperCAmelCase_  ).json()


if __name__ == "__main__":  # pragma: no cover
	if USER_TOKEN:
		for key, value in fetch_github_info(USER_TOKEN).items():
			print(f'''{key}: {value}''')
	else:
		raise ValueError("'USER_TOKEN' field cannot be empty.")





