diff --git a/pvoutput/mapscraper.py b/pvoutput/mapscraper.py index c64f1f1..57be6cc 100644 --- a/pvoutput/mapscraper.py +++ b/pvoutput/mapscraper.py @@ -273,7 +273,6 @@ def _convert_metadata_cols_to_numeric(df: pd.DataFrame) -> pd.DataFrame: def _process_output_col(soup: BeautifulSoup, index: Optional[Iterable] = None) -> pd.Series: - # get all data outputs_col = soup.find_all(text=re.compile(r"\d Days")) diff --git a/pvoutput/prcoess.py b/pvoutput/prcoess.py index 435a96f..c83e52d 100644 --- a/pvoutput/prcoess.py +++ b/pvoutput/prcoess.py @@ -44,7 +44,6 @@ def process_system_status(pv_system_status_text, date) -> pd.DataFrame: ).sort_index() except Exception as e: - # this can happen if there is only one data value and it doesnt contain all 5 columns. # if there is many rows of data, then it seems fine if pv_system_status_text.count(";") != 0: diff --git a/pvoutput/pvoutput.py b/pvoutput/pvoutput.py index 0e4ea35..b7e7f76 100644 --- a/pvoutput/pvoutput.py +++ b/pvoutput/pvoutput.py @@ -340,7 +340,6 @@ def get_system_status( pv_system_status = [] for pv_system_status_text in pv_systems_status_text: - try: one_pv_system_status = process_system_status( pv_system_status_text=pv_system_status_text, date=date @@ -924,7 +923,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", @@ -1193,7 +1192,6 @@ def check_pv_system_status(pv_system_status: pd.DataFrame, requested_date: date) def _append_missing_date_range( output_filename, pv_system_id, missing_start_date, missing_end_date, datetime_of_api_request ): - data = { "missing_start_date_PV_localtime": pd.Timestamp(missing_start_date), "missing_end_date_PV_localtime": pd.Timestamp(missing_end_date), diff --git a/scripts/scrape_country_codes.py b/scripts/scrape_country_codes.py index 5dd3ec2..fd66178 100644 --- a/scripts/scrape_country_codes.py +++ b/scripts/scrape_country_codes.py @@ -13,7 +13,6 @@ def get_country_name(manager: urllib3.PoolManager, code: int) -> str: - country_url = f"{COUNTRY_PAGES}{code}" response = manager.request("GET", country_url) @@ -25,7 +24,6 @@ def get_country_name(manager: urllib3.PoolManager, code: int) -> str: def get_all_countries() -> None: - output_dict = {} manager = urllib3.PoolManager() diff --git a/tests/test_process.py b/tests/test_process.py index 0efaf22..6dabf22 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -28,7 +28,6 @@ def test_process_system_status_2(): def test_process_system_status_none(): - one_status = process_system_status( pv_system_status_text="no status found", date=date(2022, 1, 1) )