Skip to content

Commit cb99146

Browse files
committed
Added isort, ran isort on all files
1 parent 894ebb7 commit cb99146

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+191
-217
lines changed

.isort.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[settings]
2+
default_section = THIRDPARTY
3+
multi_line_output = 3
4+
include_trailing_comma = True
5+
force_grid_wrap = 0
6+
combine_as_imports = True
7+
line_length = 88

.prepare-commit-msg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
# Any issue numbers created by this hook (or entered manually in the correct)
2222
# format will now be clickable links in the log view.
2323

24-
import sys
2524
import re
25+
import sys
2626
from subprocess import check_output
2727

2828
# By default, the hook will check to see if the branch name starts with

axelrod/__init__.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
DEFAULT_TURNS = 200
22

3-
# The order of imports matters!
4-
from axelrod.version import __version__
5-
from axelrod.load_data_ import load_pso_tables, load_weights
63
from axelrod import graph
74
from axelrod.action import Action
8-
from axelrod.random_ import random_choice, random_flip, seed, Pdf
9-
from axelrod.plot import Plot
10-
from axelrod.game import DefaultGame, Game
11-
from axelrod.history import History, LimitedHistory
12-
from axelrod.player import Player
135
from axelrod.classifier import Classifiers
6+
from axelrod.deterministic_cache import DeterministicCache
7+
from axelrod.ecosystem import Ecosystem
148
from axelrod.evolvable_player import EvolvablePlayer
15-
from axelrod.mock_player import MockPlayer
9+
from axelrod.fingerprint import AshlockFingerprint, TransitiveFingerprint
10+
from axelrod.game import DefaultGame, Game
11+
from axelrod.history import History, LimitedHistory
12+
from axelrod.load_data_ import load_pso_tables, load_weights
1613
from axelrod.match import Match
17-
from axelrod.moran import MoranProcess, ApproximateMoranProcess
18-
from axelrod.strategies import *
19-
from axelrod.deterministic_cache import DeterministicCache
2014
from axelrod.match_generator import *
21-
from axelrod.tournament import Tournament
15+
from axelrod.mock_player import MockPlayer
16+
from axelrod.moran import ApproximateMoranProcess, MoranProcess
17+
from axelrod.player import Player
18+
from axelrod.plot import Plot
19+
from axelrod.random_ import Pdf, random_choice, random_flip, seed
2220
from axelrod.result_set import ResultSet
23-
from axelrod.ecosystem import Ecosystem
24-
from axelrod.fingerprint import AshlockFingerprint, TransitiveFingerprint
21+
from axelrod.strategies import *
22+
from axelrod.tournament import Tournament
23+
# The order of imports matters!
24+
from axelrod.version import __version__

axelrod/classifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import warnings
23
from typing import (
34
Any,
45
Callable,
@@ -11,9 +12,8 @@
1112
TypeVar,
1213
Union,
1314
)
14-
import warnings
15-
import yaml
1615

16+
import yaml
1717
from axelrod.player import Player
1818

1919
ALL_CLASSIFIERS_PATH = "data/all_classifiers.yml"

axelrod/compute_finite_state_machine_memory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from axelrod.action import Action
21
from collections import defaultdict, namedtuple
3-
from typing import DefaultDict, Iterator, Dict, Tuple, Set, List
2+
from typing import DefaultDict, Dict, Iterator, List, Set, Tuple
3+
4+
from axelrod.action import Action
45

56
C, D = Action.C, Action.D
67

@@ -263,4 +264,3 @@ def get_memory_from_transitions(
263264
if len(next_action_set) == 1:
264265
return 0
265266
return 1
266-

axelrod/deterministic_cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from typing import List, Tuple
1818

1919
from axelrod import Classifiers
20+
2021
from .action import Action
2122
from .player import Player
2223

axelrod/evolvable_player.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pickle import dumps, loads
33
from random import randrange
44
from typing import Dict, List
5+
56
from .player import Player
67

78

axelrod/fingerprint.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
from tempfile import mkstemp
44
from typing import Any, List, Union
55

6+
import axelrod as axl
67
import dask.dataframe as dd
78
import matplotlib.pyplot as plt
89
import numpy as np
910
import tqdm
10-
from mpl_toolkits.axes_grid1 import make_axes_locatable
11-
12-
import axelrod as axl
1311
from axelrod import Player
1412
from axelrod.interaction_utils import (
1513
compute_final_score_per_turn,
1614
read_interactions_from_file,
1715
)
1816
from axelrod.strategy_transformers import DualTransformer, JossAnnTransformer
17+
from mpl_toolkits.axes_grid1 import make_axes_locatable
1918

2019
Point = namedtuple("Point", "x y")
2120

axelrod/match.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
from math import ceil, log
33

44
import axelrod.interaction_utils as iu
5-
from axelrod import DEFAULT_TURNS
5+
from axelrod import DEFAULT_TURNS, Classifiers
66
from axelrod.action import Action
7-
from axelrod import Classifiers
87
from axelrod.game import Game
8+
99
from .deterministic_cache import DeterministicCache
1010

1111
C, D = Action.C, Action.D

axelrod/moran.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import matplotlib.pyplot as plt
88
import numpy as np
9-
from axelrod import EvolvablePlayer, DEFAULT_TURNS, Game, Player
9+
from axelrod import DEFAULT_TURNS, EvolvablePlayer, Game, Player
1010

1111
from .deterministic_cache import DeterministicCache
1212
from .graph import Graph, complete_graph

0 commit comments

Comments
 (0)