Skip to content

Commit

Permalink
Fail test pipeline on formatting error (#715)
Browse files Browse the repository at this point in the history
* Fail of formatting error

* Fix formatting
  • Loading branch information
rikroe authored Dec 25, 2024
1 parent 2569195 commit 6dca9f8
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
ruff check --config=pyproject.toml .
- name: Test formatting
run: |
ruff format --config=pyproject.toml .
ruff format --check --config=pyproject.toml .
mypy:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions bimmer_connected/api/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def async_auth_flow(self, request: httpx.Request) -> AsyncGenerator[httpx.
request.headers["bmw-session-id"] = self.session_id

# Try getting a response
response: httpx.Response = (yield request)
response: httpx.Response = yield request

# return directly if first response was successful
if response.is_success:
Expand Down Expand Up @@ -425,7 +425,7 @@ def sync_auth_flow(self, request: httpx.Request) -> Generator[httpx.Request, htt

async def async_auth_flow(self, request: httpx.Request) -> AsyncGenerator[httpx.Request, httpx.Response]:
# Try getting a response
response: httpx.Response = (yield request)
response: httpx.Response = yield request

for _ in range(3):
if response.status_code == 429:
Expand Down
63 changes: 31 additions & 32 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

# -- Project information -----------------------------------------------------

project = 'bimmer_connected'
copyright = f'2018-{datetime.datetime.now().year}, m1n3rva, gerard33, rikroe'
author = 'm1n3rva, gerard33, rikroe'
project = "bimmer_connected"
copyright = f"2018-{datetime.datetime.now().year}, m1n3rva, gerard33, rikroe"
author = "m1n3rva, gerard33, rikroe"

# The short X.Y version
# version = const.__version__
Expand All @@ -37,42 +37,42 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'pbr.sphinxext',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx_rtd_theme',
'sphinxarg.ext'
"pbr.sphinxext",
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
"sphinx_rtd_theme",
"sphinxarg.ext",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"


# -- Options for HTML output -------------------------------------------------
Expand All @@ -81,20 +81,20 @@
# a list of builtin themes.
#
# html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
'version_selector': True,
"version_selector": True,
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand All @@ -110,7 +110,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'bimmer_connecteddoc'
htmlhelp_basename = "bimmer_connecteddoc"


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -119,15 +119,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -137,19 +134,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'bimmer_connected.tex', 'bimmer\\_connected Documentation',
'm1n3rva', 'manual'),
(master_doc, "bimmer_connected.tex", "bimmer\\_connected Documentation", "m1n3rva", "manual"),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'bimmer_connected', 'bimmer_connected Documentation',
[author], 1)
]
man_pages = [(master_doc, "bimmer_connected", "bimmer_connected Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -158,9 +151,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'bimmer_connected', 'bimmer_connected Documentation',
author, 'bimmer_connected', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"bimmer_connected",
"bimmer_connected Documentation",
author,
"bimmer_connected",
"One line description of project.",
"Miscellaneous",
),
]


Expand Down

0 comments on commit 6dca9f8

Please sign in to comment.