Skip to content

Commit

Permalink
chore: lint and format code
Browse files Browse the repository at this point in the history
  • Loading branch information
pallabpain committed Oct 17, 2024
1 parent 289cd03 commit caf8f7b
Show file tree
Hide file tree
Showing 179 changed files with 5,449 additions and 3,677 deletions.
47 changes: 23 additions & 24 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,40 @@
import os
import sys

project = u'CLI'
copyright = u'2024, Rapyuta Robotics'
author = u'Rapyuta Robotics'
project = "CLI"
copyright = "2024, Rapyuta Robotics"
author = "Rapyuta Robotics"

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

extensions = ['sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.autosummary',
'sphinx.ext.ifconfig',
'sphinx_click']
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.autosummary",
"sphinx.ext.ifconfig",
"sphinx_click",
]

templates_path = ['_templates']
templates_path = ["_templates"]
autosummary_generate = True # Turn on sphinx.ext.autosummary
source_suffix = '.rst'
master_doc = 'index'
language = 'en'
source_suffix = ".rst"
master_doc = "index"
language = "en"
exclude_patterns = []
todo_include_todos = False

html_theme = 'furo'
html_favicon = 'favicon.ico'
html_static_path = ['_static']
html_theme = "furo"
html_favicon = "favicon.ico"
html_static_path = ["_static"]
html_theme_options = {
"light_logo": "logo-light-mode.svg",
"dark_logo": "logo-dark-mode.svg",
}
html_css_files = ['css/rio-sphinx.css']
html_js_files = ['js/rio-sphinx.js']
htmlhelp_basename = 'RIOdoc'
man_pages = [
(master_doc, 'cli', u'Rapyuta IO CLI',
[author], 1)
]
html_css_files = ["css/rio-sphinx.css"]
html_js_files = ["js/rio-sphinx.js"]
htmlhelp_basename = "RIOdoc"
man_pages = [(master_doc, "cli", "Rapyuta IO CLI", [author], 1)]
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
"python": ("https://docs.python.org/3/", None),
}
add_module_names = False
3 changes: 2 additions & 1 deletion docs/source/rapyuta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
"""

import os

__version__ = '0.2.5b1'
__version__ = "0.2.5b1"
__version_full__ = __version__


Expand Down
82 changes: 81 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,84 @@ riocli = [
]

[tool.setuptools.dynamic]
version = {attr = "riocli.bootstrap.__version__"}
version = {attr = "riocli.bootstrap.__version__"}


[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]

# Same as Black.
line-length = 90
indent-width = 4

# Assume Python 3.8
target-version = "py38"

[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F", "B", "Q", "W"]
ignore = ["E741", "B904"]

# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

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

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

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"

# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = false

# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"
3 changes: 2 additions & 1 deletion riocli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# on windows.
from sys import platform

if platform.lower() == 'win32':
if platform.lower() == "win32":
import signal

signal.SIGKILL = signal.SIGTERM
Loading

0 comments on commit caf8f7b

Please sign in to comment.