Skip to content

Commit

Permalink
ci: fix ruff-reported errors manually
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-boyu authored and rht committed Feb 6, 2023
1 parent 45963c3 commit 38d5ae7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion mesa_geo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
__title__ = "Mesa-Geo"
__version__ = "0.4.0"
__license__ = "Apache 2.0"
__copyright__ = "Copyright %s Project Mesa-Geo Team" % datetime.date.today().year
_this_year = datetime.datetime.now(tz=datetime.timezone.utc).date().year
__copyright__ = f"Copyright {_this_year} Project Mesa-Geo Team"
4 changes: 3 additions & 1 deletion mesa_geo/geoagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ def from_file(self, filename, unique_id="index", set_attributes=True):
)
return agents

def from_GeoJSON(self, GeoJSON, unique_id="index", set_attributes=True):
def from_GeoJSON(
self, GeoJSON, unique_id="index", set_attributes=True # noqa: N803
):
"""
Create agents from a GeoJSON object or string. CRS is set to epsg:4326.
Expand Down
4 changes: 2 additions & 2 deletions mesa_geo/visualization/modules/MapVisualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class LeafletPortrayal:
"""

style: dict[str, LeafletOption] | None = None
pointToLayer: dict[str, LeafletOption] | None = None
popupProperties: dict[str, LeafletOption] | None = None
pointToLayer: dict[str, LeafletOption] | None = None # noqa: N815
popupProperties: dict[str, LeafletOption] | None = None # noqa: N815


class MapModule(VisualizationElement):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_Examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_examples(self):
f"{example.replace('-', '_')}.server"
)
server.server.render_model()
Model = getattr(mod, classcase(example))
model = Model()
model_class = getattr(mod, classcase(example))
model = model_class()
for _ in range(10):
model.step()
1 change: 0 additions & 1 deletion tests/test_MapModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ def test_render_line_agents(self):
)

def test_render_polygon_agents(self):

self.maxDiff = None

map_module = mg.visualization.MapModule(
Expand Down

0 comments on commit 38d5ae7

Please sign in to comment.