From cc804dd1aa151126396bbd458bb72c40fc83a1b6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 17:53:33 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pvoutput/__init__.py | 1 + pvoutput/consts.py | 1 + pvoutput/daterange.py | 1 + pvoutput/exceptions.py | 1 + pvoutput/grid_search/__init__.py | 1 + pvoutput/grid_search/app.py | 1 + pvoutput/grid_search/clip.py | 1 + pvoutput/grid_search/natural_earth.py | 1 + pvoutput/mapscraper.py | 1 + pvoutput/prcoess.py | 1 + pvoutput/pvoutput.py | 3 ++- pvoutput/utils.py | 1 + scripts/scrape_country_codes.py | 1 + 13 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pvoutput/__init__.py b/pvoutput/__init__.py index b060ca1..ea08fe3 100644 --- a/pvoutput/__init__.py +++ b/pvoutput/__init__.py @@ -1,4 +1,5 @@ """ Init PVoutput library""" + from .pvoutput import * # noqa __version__ = 0.1 diff --git a/pvoutput/consts.py b/pvoutput/consts.py index 9a251ed..082ebe6 100644 --- a/pvoutput/consts.py +++ b/pvoutput/consts.py @@ -1,4 +1,5 @@ """ Constants used in this repo """ + import os from datetime import timedelta from urllib.parse import urljoin diff --git a/pvoutput/daterange.py b/pvoutput/daterange.py index af42763..ac4ab07 100644 --- a/pvoutput/daterange.py +++ b/pvoutput/daterange.py @@ -1,4 +1,5 @@ """Date Range Class """ + from dataclasses import dataclass from datetime import date, datetime, timedelta from typing import Iterable, List, Union diff --git a/pvoutput/exceptions.py b/pvoutput/exceptions.py index bd0598e..e1bf3ee 100644 --- a/pvoutput/exceptions.py +++ b/pvoutput/exceptions.py @@ -1,4 +1,5 @@ """ Custom Exeception classes """ + import requests diff --git a/pvoutput/grid_search/__init__.py b/pvoutput/grid_search/__init__.py index 14f0e09..a0150a9 100644 --- a/pvoutput/grid_search/__init__.py +++ b/pvoutput/grid_search/__init__.py @@ -1,2 +1,3 @@ """ Init for grid saerch module """ + from .grid_search import GridSearch diff --git a/pvoutput/grid_search/app.py b/pvoutput/grid_search/app.py index 2a63c8f..11a81d9 100644 --- a/pvoutput/grid_search/app.py +++ b/pvoutput/grid_search/app.py @@ -10,6 +10,7 @@ - Jamie Taylor - First Authored: 2021-11-16 """ + import argparse import logging import os diff --git a/pvoutput/grid_search/clip.py b/pvoutput/grid_search/clip.py index 0f3ba95..60007fd 100644 --- a/pvoutput/grid_search/clip.py +++ b/pvoutput/grid_search/clip.py @@ -1,4 +1,5 @@ """Clipping function for coordinates""" + from typing import Iterable, Optional, Tuple, Union import geopandas as gpd diff --git a/pvoutput/grid_search/natural_earth.py b/pvoutput/grid_search/natural_earth.py index 729c62c..6b10b70 100644 --- a/pvoutput/grid_search/natural_earth.py +++ b/pvoutput/grid_search/natural_earth.py @@ -1,4 +1,5 @@ """Retrieve Natural Earth world boundaries.""" + import logging import os from io import BytesIO diff --git a/pvoutput/mapscraper.py b/pvoutput/mapscraper.py index c64f1f1..194972d 100644 --- a/pvoutput/mapscraper.py +++ b/pvoutput/mapscraper.py @@ -1,4 +1,5 @@ """ Code for scraping for pv systems """ + import re from copy import copy from typing import Iterable, Optional, Union diff --git a/pvoutput/prcoess.py b/pvoutput/prcoess.py index 435a96f..3260ce1 100644 --- a/pvoutput/prcoess.py +++ b/pvoutput/prcoess.py @@ -1,4 +1,5 @@ """ Function to process data """ + import logging from io import StringIO diff --git a/pvoutput/pvoutput.py b/pvoutput/pvoutput.py index 0e4ea35..916ab0b 100644 --- a/pvoutput/pvoutput.py +++ b/pvoutput/pvoutput.py @@ -1,4 +1,5 @@ """ Main PV Output class to get data from pvoutput.org """ + import logging import os import time @@ -924,7 +925,7 @@ def _download_multiple_worker( ) else: total_rows += len(timeseries) - _LOG.info(f'Adding timezone {timezone} to {total_rows} rows') + _LOG.info(f"Adding timezone {timezone} to {total_rows} rows") timeseries = timeseries.tz_localize(timezone) _LOG.info( "system_id: %d: %d rows retrieved: %s to %s", diff --git a/pvoutput/utils.py b/pvoutput/utils.py index 0ac51fe..0db6e0d 100644 --- a/pvoutput/utils.py +++ b/pvoutput/utils.py @@ -1,4 +1,5 @@ """ Util functions""" + import logging import os import sys diff --git a/scripts/scrape_country_codes.py b/scripts/scrape_country_codes.py index 5dd3ec2..910f378 100644 --- a/scripts/scrape_country_codes.py +++ b/scripts/scrape_country_codes.py @@ -3,6 +3,7 @@ Prints and saves a dictionary mapping the country names to their codes. """ + import json import urllib3