Skip to content

Commit

Permalink
Formating and linting with Ruff.
Browse files Browse the repository at this point in the history
  • Loading branch information
omaciel committed Mar 30, 2024
1 parent c35bad2 commit 1920f11
Show file tree
Hide file tree
Showing 31 changed files with 612 additions and 586 deletions.
64 changes: 34 additions & 30 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
sys.path.insert(
0, os.path.realpath(os.path.join(os.path.dirname(__file__), os.path.pardir))
)

# -- General configuration ------------------------------------------------

Expand All @@ -36,35 +38,35 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.viewcode',
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.viewcode",
]

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

# The suffix of source filenames.
source_suffix = '.rst'
source_suffix = ".rst"

# The encoding of source files.
# source_encoding = 'utf-8-sig'

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

# General information about the project.
project = 'FauxFactory'
copyright = '2014-2017, Og Maciel' # pylint:disable=redefined-builtin
project = "FauxFactory"
copyright = "2014-2017, Og Maciel" # pylint:disable=redefined-builtin

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '3.0'
version = "3.0"
# The full version, including alpha/beta/rc tags.
release = '3.0.0'
release = "3.0.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -78,7 +80,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ["_build"]

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand All @@ -96,7 +98,7 @@
# show_authors = False

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

# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
Expand All @@ -111,20 +113,20 @@
# A list of (type, target) tuples (by default empty) that should be ignored
# when generating warnings in “nitpicky mode”.
nitpick_ignore = [
('py:class', 'bool'),
('py:class', 'dict'),
('py:class', 'int'),
('py:class', 'list'),
('py:class', 'str'),
('py:class', 'tuple'),
("py:class", "bool"),
("py:class", "dict"),
("py:class", "int"),
("py:class", "list"),
("py:class", "str"),
("py:class", "tuple"),
]


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'nature'
html_theme = "nature"

# 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
Expand Down Expand Up @@ -202,7 +204,7 @@
# html_file_suffix = None

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


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -219,7 +221,9 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [('index', 'FauxFactory.tex', 'FauxFactory Documentation', 'Og Maciel', 'manual')]
latex_documents = [
("index", "FauxFactory.tex", "FauxFactory Documentation", "Og Maciel", "manual")
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
Expand All @@ -246,7 +250,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [('index', 'fauxfactory', 'FauxFactory Documentation', ['Og Maciel'], 1)]
man_pages = [("index", "fauxfactory", "FauxFactory Documentation", ["Og Maciel"], 1)]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand All @@ -259,13 +263,13 @@
# dir menu entry, description, category)
texinfo_documents = [
(
'index',
'FauxFactory',
'FauxFactory Documentation',
'Og Maciel',
'FauxFactory',
'FauxFactory generates random data for your automated tests easily!',
'Miscellaneous',
"index",
"FauxFactory",
"FauxFactory Documentation",
"Og Maciel",
"FauxFactory",
"FauxFactory generates random data for your automated tests easily!",
"Miscellaneous",
)
]

Expand Down
4 changes: 2 additions & 2 deletions fauxfactory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from fauxfactory.factories.systems import * # noqa: F401, F403


__factories = {name: obj for name, obj in locals().items() if name.startswith('gen_')}
__factories = {name: obj for name, obj in locals().items() if name.startswith("gen_")}

# Add all method names to __all__
__all__ = tuple(__factories.keys())
Expand All @@ -30,4 +30,4 @@ def __dir__():
def __getattr__(name):
if name in __factories:
return __factories[name]
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
Loading

0 comments on commit 1920f11

Please sign in to comment.