Skip to content

Commit

Permalink
Update formatting to fit black 24.3 reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
doyled-it committed Apr 10, 2024
1 parent ab1e06e commit d704c37
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions simfire/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
burn status, the ordering of sprite layers, how much to attenuate the rate of spread on
different types of control lines, and the current game status.
"""

from dataclasses import dataclass
from enum import Enum, IntEnum, auto
from pathlib import Path
Expand Down
7 changes: 4 additions & 3 deletions simfire/game/managers/fire.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Defines the different `FireManager`s (`ConstantSpreadFireManager` and
`RothermelFireManager`) that determine how a fire moves about a `fire_map`.
"""

import collections
from dataclasses import astuple
from typing import Any, List, Optional, Sequence, Tuple, Union
Expand Down Expand Up @@ -270,9 +271,9 @@ def _update_rate_of_spread(
factor = np.zeros_like(rate_of_spread)
if self.attenuate_line_ros:
factor[np.where(fire_map == BurnStatus.FIRELINE)] = RoSAttenuation.FIRELINE
factor[
np.where(fire_map == BurnStatus.SCRATCHLINE)
] = RoSAttenuation.SCRATCHLINE
factor[np.where(fire_map == BurnStatus.SCRATCHLINE)] = (
RoSAttenuation.SCRATCHLINE
)
factor[np.where(fire_map == BurnStatus.WETLINE)] = RoSAttenuation.WETLINE
rate_of_spread = rate_of_spread - factor
else:
Expand Down
7 changes: 4 additions & 3 deletions simfire/utils/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module containing all config parsing and dataclass logic.
"""

import dataclasses
import os
import random
Expand Down Expand Up @@ -274,9 +275,9 @@ def _make_lat_long_box(self) -> Optional[LandFireLatLongBox]:
year = self.yaml_data["operational"]["year"]
self._set_all_combos()
if self.yaml_data["operational"]["seed"] is not None:
points: Tuple[
Tuple[float, float], Tuple[float, float]
] = self._randomly_select_box(self.yaml_data["operational"]["seed"])
points: Tuple[Tuple[float, float], Tuple[float, float]] = (
self._randomly_select_box(self.yaml_data["operational"]["seed"])
)
valid = self._check_lat_long(points)
if not valid:
if self.landfire_lat_long_box is None:
Expand Down
1 change: 1 addition & 0 deletions simfire/utils/generate_cfd_wind_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Seperate file to precompute wind layer, currently using wind with a single time slice
due to processing limitations.
"""

import time
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions simfire/world/presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Urban, Snow/Ice, Agricutlture, Water, Barren are Non-Burnable fuel types as described in:
https://gacc.nifc.gov/oncc/docs/40-Standard%20Fire%20Behavior%20Fuel%20Models.pdf
"""

from .parameters import Fuel

ShortGrass = Fuel(w_0=0.0340, delta=1.000, M_x=0.1200, sigma=3500)
Expand Down
1 change: 1 addition & 0 deletions tests/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
installed package. If it fails, there is likely a `src` imported somewhere instead of a
relative import.
"""

import sys
import traceback
from importlib import import_module
Expand Down

0 comments on commit d704c37

Please sign in to comment.