Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blackify #38

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 27 additions & 21 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,52 @@

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

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

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'romsearch'
copyright = '2024, bbtufty'
author = 'bbtufty'
release = '0.0.7'
project = "romsearch"
copyright = "2024, bbtufty"
author = "bbtufty"
release = "0.0.7"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx_automodapi.automodapi',
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_automodapi.automodapi",
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
templates_path = ["_templates"]
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
]

master_doc = 'index'
master_doc = "index"

todo_include_todos = True

html_theme_options = {
'collapse_navigation': False,
'navigation_depth': 4,
'globaltoc_collapse': False,
'globaltoc_includehidden': False,
'display_version': True,
"collapse_navigation": False,
"navigation_depth": 4,
"globaltoc_collapse": False,
"globaltoc_includehidden": False,
"display_version": True,
}

autoclass_content = 'both'
autoclass_content = "both"

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"
html_static_path = []
21 changes: 11 additions & 10 deletions romsearch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
# Get the version
__version__ = version(__name__)

from .modules import (DATParser,
DupeParser,
GameFinder,
RAHasher,
ROMDownloader,
ROMChooser,
ROMMover,
ROMParser,
ROMSearch
)
from .modules import (
DATParser,
DupeParser,
GameFinder,
RAHasher,
ROMDownloader,
ROMChooser,
ROMMover,
ROMParser,
ROMSearch,
)

__all__ = [
"DATParser",
Expand Down
23 changes: 13 additions & 10 deletions romsearch/dev/parsing_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ def check_regex_parsing(dat_filename):
# Parse all the names in the dat file
all_file_dict = {}
for f in all_files:
short_name = get_short_name(f,
regex_config=regex_config,
default_config=default_config,
)
short_name = get_short_name(
f,
regex_config=regex_config,
default_config=default_config,
)

all_file_dict[f] = {
"short_name": short_name,
Expand All @@ -45,9 +46,10 @@ def check_regex_parsing(dat_filename):
return all_file_dict


def parse_games_from_dat(config_file,
platform,
):
def parse_games_from_dat(
config_file,
platform,
):
"""Using a config file and platform, parse all the games from a dat

This will include the dupe parsing and everything if specified in the config
Expand All @@ -67,9 +69,10 @@ def parse_games_from_dat(config_file,

all_file_dict = check_regex_parsing(dat_filename)

finder = GameFinder(config_file=config_file,
platform=platform,
)
finder = GameFinder(
config_file=config_file,
platform=platform,
)
finder.logger.setLevel(logging.WARNING)

all_games = finder.run(files=all_file_dict)
Expand Down
Loading