Skip to content

Commit

Permalink
Merge pull request projectmesa#863 from projectmesa/Corvince-fix-issu…
Browse files Browse the repository at this point in the history
…e-855

remove relative imports -- fix projectmesa#855
  • Loading branch information
jackiekazil authored Oct 3, 2020
2 parents f15b272 + 0f1bcdc commit 2e66e9f
Show file tree
Hide file tree
Showing 18 changed files with 9 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ target/
.mypy_cache/
.dmypy.json
dmypy.json

# pythonenv
pythonenv*/
4 changes: 2 additions & 2 deletions mesa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"""
import datetime

from .model import Model
from .agent import Agent
from mesa.model import Model
from mesa.agent import Agent


__all__ = ["Model", "Agent"]
Expand Down
3 changes: 1 addition & 2 deletions mesa/agent.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# -*- coding: utf-8 -*-
"""
The agent class for Mesa framework.
Core Objects: Agent
"""
# mypy
from .model import Model
from mesa.model import Model
from random import Random


Expand Down
1 change: 0 additions & 1 deletion mesa/batchrunner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Batchrunner
===========
Expand Down
1 change: 0 additions & 1 deletion mesa/datacollection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Mesa Data Collection Module
===========================
Expand Down
1 change: 0 additions & 1 deletion mesa/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
The model class for Mesa framework.
Expand Down
3 changes: 1 addition & 2 deletions mesa/space.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Mesa Space Module
=================
Expand All @@ -19,7 +18,7 @@
import numpy as np

from typing import Any, Dict, Iterable, Iterator, List, Optional, Set, Tuple, Union
from .agent import Agent
from mesa.agent import Agent

Coordinate = Tuple[int, int]
GridContent = Union[Optional[Agent], Set[Agent]]
Expand Down
5 changes: 2 additions & 3 deletions mesa/time.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Mesa Time Module
================
Expand Down Expand Up @@ -26,8 +25,8 @@

# mypy
from typing import Dict, Iterator, List, Optional, Union
from .agent import Agent
from .model import Model
from mesa.agent import Agent
from mesa.model import Model


# BaseScheduler has a self.time of int, while
Expand Down
1 change: 0 additions & 1 deletion mesa/visualization/ModularVisualization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
ModularServer
=============
Expand Down
1 change: 0 additions & 1 deletion mesa/visualization/TextVisualization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Text Visualization
==================
Expand Down
1 change: 0 additions & 1 deletion mesa/visualization/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Mesa Visualization Module
-------------------------
Expand Down
1 change: 0 additions & 1 deletion mesa/visualization/modules/BarChartVisualization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Pie Chart Module
============
Expand Down
1 change: 0 additions & 1 deletion mesa/visualization/modules/CanvasGridVisualization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Modular Canvas Rendering
========================
Expand Down
1 change: 0 additions & 1 deletion mesa/visualization/modules/ChartVisualization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Chart Module
============
Expand Down
1 change: 0 additions & 1 deletion mesa/visualization/modules/HexGridVisualization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Modular Canvas Rendering
========================
Expand Down
1 change: 0 additions & 1 deletion mesa/visualization/modules/NetworkVisualization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Network Visualization Module
============
Expand Down
1 change: 0 additions & 1 deletion mesa/visualization/modules/PieChartVisualization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Pie Chart Module
============
Expand Down
1 change: 0 additions & 1 deletion mesa/visualization/modules/TextVisualization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Text Module
============
Expand Down

0 comments on commit 2e66e9f

Please sign in to comment.