Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 4, 2023
1 parent 17022dc commit 711bb42
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion pvoutput/mapscraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))

Expand Down
1 change: 0 additions & 1 deletion pvoutput/prcoess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions pvoutput/pvoutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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),
Expand Down
2 changes: 0 additions & 2 deletions scripts/scrape_country_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -25,7 +24,6 @@ def get_country_name(manager: urllib3.PoolManager, code: int) -> str:


def get_all_countries() -> None:

output_dict = {}

manager = urllib3.PoolManager()
Expand Down
1 change: 0 additions & 1 deletion tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down

0 comments on commit 711bb42

Please sign in to comment.