Skip to content

Commit

Permalink
single quote
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitsanj committed Aug 4, 2024
1 parent 181b4cf commit 334e712
Show file tree
Hide file tree
Showing 20 changed files with 291 additions and 292 deletions.
68 changes: 34 additions & 34 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
from importlib.metadata import version as read_version


sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath('..'))


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

project = "testbook"
copyright = "2024, nteract team"
author = "nteract team"
project = 'testbook'
copyright = '2024, nteract team'
author = 'nteract team'


# -- General configuration ---------------------------------------------------
Expand All @@ -31,28 +31,28 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"myst_parser",
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'myst_parser',
]

# 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', '.md']

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

# General information about the project.
project = "testbook"
copyright = "2024, nteract team"
author = "nteract team"
project = 'testbook'
copyright = '2024, nteract team'
author = 'nteract team'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -61,7 +61,7 @@


# The short X.Y version.
version = '.'.join(read_version(project).split(".")[0:2])
version = '.'.join(read_version(project).split('.')[0:2])

# The full version, including alpha/beta/rc tags.
release = read_version(project)
Expand All @@ -71,15 +71,15 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line foexitr 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 patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "UPDATE.md"]
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'UPDATE.md']

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

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -90,31 +90,31 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_book_theme"
html_theme = 'sphinx_book_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 = {
"path_to_docs": "docs",
"repository_url": "https://github.com/nteract/testbook",
"repository_branch": "main",
"use_edit_page_button": True,
'path_to_docs': 'docs',
'repository_url': 'https://github.com/nteract/testbook',
'repository_branch': 'main',
'use_edit_page_button': 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_title = "testbook"
html_title = 'testbook'

# -- Options for HTMLHelp output ------------------------------------------

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


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -138,15 +138,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "testbook.tex", "testbook Documentation", "nteract team", "manual")
(master_doc, 'testbook.tex', 'testbook Documentation', 'nteract team', '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, "testbook", "testbook Documentation", [author], 1)]
man_pages = [(master_doc, 'testbook', 'testbook Documentation', [author], 1)]


# -- Options for Texinfo output -------------------------------------------
Expand All @@ -157,17 +157,17 @@
texinfo_documents = [
(
master_doc,
"testbook",
"testbook Documentation",
'testbook',
'testbook Documentation',
author,
"testbook",
"One line description of project.",
"Miscellaneous",
'testbook',
'One line description of project.',
'Miscellaneous',
)
]

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"python": ("https://docs.python.org/", None)}
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}

# Generate heading anchors for h1, h2 and h3.
myst_heading_anchors = 3
8 changes: 4 additions & 4 deletions examples/dataframe-example/dataframe_test.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from testbook import testbook


@testbook("./dataframe-assertion-example.ipynb")
@testbook('./dataframe-assertion-example.ipynb')
def test_dataframe_manipulation(tb):
tb.execute_cell("imports")
tb.execute_cell('imports')

# Inject a dataframe with code
tb.inject(
Expand All @@ -13,7 +13,7 @@ def test_dataframe_manipulation(tb):
)

# Perform manipulation
tb.execute_cell("manipulation")
tb.execute_cell('manipulation')

# Inject assertion into notebook
tb.inject("assert len(df) == 1")
tb.inject('assert len(df) == 1')
10 changes: 5 additions & 5 deletions examples/requests-example/requests_test.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from testbook import testbook


@testbook("./requests-test.ipynb", execute=True)
@testbook('./requests-test.ipynb', execute=True)
def test_get_details(tb):
with tb.patch("requests.get") as mock_get:
get_details = tb.ref("get_details") # get reference to function
get_details("https://my-api.com")
with tb.patch('requests.get') as mock_get:
get_details = tb.ref('get_details') # get reference to function
get_details('https://my-api.com')

mock_get.assert_called_with("https://my-api.com")
mock_get.assert_called_with('https://my-api.com')
6 changes: 3 additions & 3 deletions examples/stdout-example/stdout_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from testbook import testbook


@testbook("stdout-assertion-example.ipynb", execute=True)
@testbook('stdout-assertion-example.ipynb', execute=True)
def test_stdout(tb):
assert tb.cell_output_text(1) == "hello world!"
assert tb.cell_output_text(1) == 'hello world!'

assert "The current time is" in tb.cell_output_text(2)
assert 'The current time is' in tb.cell_output_text(2)
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
quote-style = "single"

# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
Expand Down
Loading

0 comments on commit 334e712

Please sign in to comment.