From 560ba17486aa4e9ceab4a018a5dd46e5089173c8 Mon Sep 17 00:00:00 2001 From: Tom Donoghue Date: Fri, 21 Jul 2023 15:20:49 -0400 Subject: [PATCH] small lint fixes --- fooof/core/modutils.py | 6 +++--- fooof/objs/group.py | 2 +- fooof/plts/style.py | 4 ++-- fooof/utils/download.py | 1 - fooof/version.py | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fooof/core/modutils.py b/fooof/core/modutils.py index bab19069..d379a9dc 100644 --- a/fooof/core/modutils.py +++ b/fooof/core/modutils.py @@ -99,10 +99,10 @@ def get_docs_indices(docstring, sections=DOCSTRING_SECTIONS): Dictionary in which each key is a section label, and each value is the corresponding index. """ - inds = {label : None for label in DOCSTRING_SECTIONS} + inds = {label : None for label in sections} for ind, line in enumerate(docstring.split('\n')): - for key, val in inds.items(): + for key in inds: if key in line: inds[key] = ind @@ -132,7 +132,7 @@ def docs_drop_param(docstring): ind = docstring.find(sep) + len(sep) front, back = docstring[:ind], docstring[ind:] - for loop in range(2): + for _ in range(2): back = back[back.find('\n')+1:] return front + back diff --git a/fooof/objs/group.py b/fooof/objs/group.py index c30ab803..edda8bd8 100644 --- a/fooof/objs/group.py +++ b/fooof/objs/group.py @@ -544,7 +544,7 @@ def save_model_report(self, index, file_name, file_path=None, plt_log=False, """ self.get_fooof(ind=index, regenerate=True).save_report(\ - file_name, file_path, plt_log, **plot_kwargs) + file_name, file_path, plt_log, add_settings, **plot_kwargs) def to_df(self, peak_org): diff --git a/fooof/plts/style.py b/fooof/plts/style.py index 7f9566ff..b91a5b32 100644 --- a/fooof/plts/style.py +++ b/fooof/plts/style.py @@ -6,8 +6,8 @@ import matplotlib.pyplot as plt from fooof.plts.settings import (AXIS_STYLE_ARGS, LINE_STYLE_ARGS, COLLECTION_STYLE_ARGS, - CUSTOM_STYLE_ARGS, STYLE_ARGS, LABEL_SIZE, LEGEND_SIZE, - LEGEND_LOC, TICK_LABELSIZE, TITLE_FONTSIZE) + STYLE_ARGS, LABEL_SIZE, LEGEND_SIZE, LEGEND_LOC, + TICK_LABELSIZE, TITLE_FONTSIZE) ################################################################################################### ################################################################################################### diff --git a/fooof/utils/download.py b/fooof/utils/download.py index db0cbf03..d5b8a4b2 100644 --- a/fooof/utils/download.py +++ b/fooof/utils/download.py @@ -1,7 +1,6 @@ """Functions and utilities for downloading example data for fooof.""" import os -from pathlib import Path from urllib.request import urlretrieve import numpy as np diff --git a/fooof/version.py b/fooof/version.py index 0731bc61..f5fc7cfc 100644 --- a/fooof/version.py +++ b/fooof/version.py @@ -1 +1 @@ -__version__ = '1.1.0rc0' \ No newline at end of file +__version__ = '1.1.0rc1' \ No newline at end of file