Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyagreco committed Dec 5, 2023
1 parent 8842be0 commit b72ba6a
Show file tree
Hide file tree
Showing 62 changed files with 151 additions and 186 deletions.
3 changes: 1 addition & 2 deletions e2e/variables.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from leeger.enum import MatchupType
from leeger.model.league import (League, Matchup, Owner, Team, Week, Year,
YearSettings)
from leeger.model.league import League, Matchup, Owner, Team, Week, Year, YearSettings
from leeger.model.league.Division import Division

ownerFrankie = Owner(name="Frankie")
Expand Down
3 changes: 1 addition & 2 deletions example/league/manualLeagueBuildingExample.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from leeger.enum import MatchupType
from leeger.model.league import (League, Matchup, Owner, Team, Week, Year,
YearSettings)
from leeger.model.league import League, Matchup, Owner, Team, Week, Year, YearSettings
from leeger.model.league.Division import Division

if __name__ == "__main__":
Expand Down
3 changes: 1 addition & 2 deletions example/league_loader/fleaflickerLeagueLoaderExample.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from leeger.league_loader.FleaflickerLeagueLoader import \
FleaflickerLeagueLoader
from leeger.league_loader.FleaflickerLeagueLoader import FleaflickerLeagueLoader
from leeger.model.league import League

if __name__ == "__main__":
Expand Down
12 changes: 8 additions & 4 deletions example/stat/gettingStatsAllTimeExample.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
from leeger.calculator.all_time_calculator import (
AWALAllTimeCalculator, GameOutcomeAllTimeCalculator,
PointsScoredAllTimeCalculator, ScoringShareAllTimeCalculator,
ScoringStandardDeviationAllTimeCalculator, SingleScoreAllTimeCalculator,
SmartWinsAllTimeCalculator)
AWALAllTimeCalculator,
GameOutcomeAllTimeCalculator,
PointsScoredAllTimeCalculator,
ScoringShareAllTimeCalculator,
ScoringStandardDeviationAllTimeCalculator,
SingleScoreAllTimeCalculator,
SmartWinsAllTimeCalculator,
)
from leeger.league_loader import ESPNLeagueLoader
from leeger.model.league import League
from leeger.model.stat.AllTimeStatSheet import AllTimeStatSheet
Expand Down
9 changes: 6 additions & 3 deletions example/stat/gettingStatsForYearExample.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from leeger.calculator.year_calculator import (
GameOutcomeYearCalculator, PointsScoredYearCalculator,
ScoringShareYearCalculator, ScoringStandardDeviationYearCalculator,
SingleScoreYearCalculator)
GameOutcomeYearCalculator,
PointsScoredYearCalculator,
ScoringShareYearCalculator,
ScoringStandardDeviationYearCalculator,
SingleScoreYearCalculator,
)
from leeger.league_loader import ESPNLeagueLoader
from leeger.model.league import League, Year
from leeger.model.stat.YearStatSheet import YearStatSheet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Optional

from leeger.calculator.parent.AllTimeCalculator import AllTimeCalculator
from leeger.calculator.year_calculator.AWALYearCalculator import \
AWALYearCalculator
from leeger.calculator.year_calculator.AWALYearCalculator import AWALYearCalculator
from leeger.decorator.validators import validateLeague
from leeger.model.filter import AllTimeFilters
from leeger.model.league.League import League
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Optional

from leeger.calculator.parent.AllTimeCalculator import AllTimeCalculator
from leeger.calculator.year_calculator.GameOutcomeYearCalculator import \
GameOutcomeYearCalculator
from leeger.calculator.year_calculator.GameOutcomeYearCalculator import GameOutcomeYearCalculator
from leeger.decorator.validators import validateLeague
from leeger.model.filter import AllTimeFilters
from leeger.model.league.League import League
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Optional

from leeger.calculator.parent.AllTimeCalculator import AllTimeCalculator
from leeger.calculator.year_calculator.PlusMinusYearCalculator import \
PlusMinusYearCalculator
from leeger.calculator.year_calculator.PlusMinusYearCalculator import PlusMinusYearCalculator
from leeger.decorator.validators import validateLeague
from leeger.model.league.League import League
from leeger.util.Deci import Deci
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Optional

from leeger.calculator.parent.AllTimeCalculator import AllTimeCalculator
from leeger.calculator.year_calculator.PointsScoredYearCalculator import \
PointsScoredYearCalculator
from leeger.calculator.year_calculator.PointsScoredYearCalculator import PointsScoredYearCalculator
from leeger.decorator.validators import validateLeague
from leeger.model.filter import AllTimeFilters
from leeger.model.league.League import League
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Optional

from leeger.calculator.parent.AllTimeCalculator import AllTimeCalculator
from leeger.calculator.year_calculator.SSLYearCalculator import \
SSLYearCalculator
from leeger.calculator.year_calculator.SSLYearCalculator import SSLYearCalculator
from leeger.decorator.validators import validateLeague
from leeger.model.filter import AllTimeFilters
from leeger.model.league.League import League
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from typing import Optional

from leeger.calculator.all_time_calculator.PointsScoredAllTimeCalculator import \
PointsScoredAllTimeCalculator
from leeger.calculator.all_time_calculator.PointsScoredAllTimeCalculator import (
PointsScoredAllTimeCalculator,
)
from leeger.calculator.parent.AllTimeCalculator import AllTimeCalculator
from leeger.calculator.year_calculator import ScoringShareYearCalculator
from leeger.decorator.validators import validateLeague
Expand Down
3 changes: 1 addition & 2 deletions leeger/calculator/all_time_calculator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from .PlusMinusAllTimeCalculator import PlusMinusAllTimeCalculator
from .PointsScoredAllTimeCalculator import PointsScoredAllTimeCalculator
from .ScoringShareAllTimeCalculator import ScoringShareAllTimeCalculator
from .ScoringStandardDeviationAllTimeCalculator import \
ScoringStandardDeviationAllTimeCalculator
from .ScoringStandardDeviationAllTimeCalculator import ScoringStandardDeviationAllTimeCalculator
from .SingleScoreAllTimeCalculator import SingleScoreAllTimeCalculator
from .SmartWinsAllTimeCalculator import SmartWinsAllTimeCalculator
from .SSLAllTimeCalculator import SSLAllTimeCalculator
Expand Down
3 changes: 1 addition & 2 deletions leeger/calculator/year_calculator/AWALYearCalculator.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Optional

from leeger.calculator.parent.YearCalculator import YearCalculator
from leeger.calculator.year_calculator.GameOutcomeYearCalculator import \
GameOutcomeYearCalculator
from leeger.calculator.year_calculator.GameOutcomeYearCalculator import GameOutcomeYearCalculator
from leeger.decorator.validators import validateYear
from leeger.model.filter import YearFilters
from leeger.model.filter.WeekFilters import WeekFilters
Expand Down
3 changes: 1 addition & 2 deletions leeger/calculator/year_calculator/PlusMinusYearCalculator.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Optional

from leeger.calculator.parent.YearCalculator import YearCalculator
from leeger.calculator.year_calculator.PointsScoredYearCalculator import \
PointsScoredYearCalculator
from leeger.calculator.year_calculator.PointsScoredYearCalculator import PointsScoredYearCalculator
from leeger.decorator.validators import validateYear
from leeger.model.league.Year import Year
from leeger.util.Deci import Deci
Expand Down
12 changes: 4 additions & 8 deletions leeger/calculator/year_calculator/SSLYearCalculator.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
from typing import Optional

from leeger.calculator.parent.YearCalculator import YearCalculator
from leeger.calculator.year_calculator.AWALYearCalculator import \
AWALYearCalculator
from leeger.calculator.year_calculator.GameOutcomeYearCalculator import \
GameOutcomeYearCalculator
from leeger.calculator.year_calculator.ScoringShareYearCalculator import \
ScoringShareYearCalculator
from leeger.calculator.year_calculator.SingleScoreYearCalculator import \
SingleScoreYearCalculator
from leeger.calculator.year_calculator.AWALYearCalculator import AWALYearCalculator
from leeger.calculator.year_calculator.GameOutcomeYearCalculator import GameOutcomeYearCalculator
from leeger.calculator.year_calculator.ScoringShareYearCalculator import ScoringShareYearCalculator
from leeger.calculator.year_calculator.SingleScoreYearCalculator import SingleScoreYearCalculator
from leeger.decorator.validators import validateYear
from leeger.model.league.Year import Year
from leeger.util.Deci import Deci
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Optional

from leeger.calculator.parent.YearCalculator import YearCalculator
from leeger.calculator.year_calculator.PointsScoredYearCalculator import \
PointsScoredYearCalculator
from leeger.calculator.year_calculator.PointsScoredYearCalculator import PointsScoredYearCalculator
from leeger.decorator.validators import validateYear
from leeger.model.filter import WeekFilters, YearFilters
from leeger.model.league.Year import Year
Expand Down
3 changes: 1 addition & 2 deletions leeger/calculator/year_calculator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from .PlusMinusYearCalculator import PlusMinusYearCalculator
from .PointsScoredYearCalculator import PointsScoredYearCalculator
from .ScoringShareYearCalculator import ScoringShareYearCalculator
from .ScoringStandardDeviationYearCalculator import \
ScoringStandardDeviationYearCalculator
from .ScoringStandardDeviationYearCalculator import ScoringStandardDeviationYearCalculator
from .SingleScoreYearCalculator import SingleScoreYearCalculator
from .SmartWinsYearCalculator import SmartWinsYearCalculator
from .SSLYearCalculator import SSLYearCalculator
Expand Down
3 changes: 1 addition & 2 deletions leeger/decorator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from .validators import (validateLeague, validateMatchup, validateWeek,
validateYear)
from .validators import validateLeague, validateMatchup, validateWeek, validateYear
3 changes: 1 addition & 2 deletions leeger/decorator/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
from leeger.model.league.Matchup import Matchup
from leeger.model.league.Week import Week
from leeger.model.league.Year import Year
from leeger.validate import (leagueValidation, matchupValidation,
weekValidation, yearValidation)
from leeger.validate import leagueValidation, matchupValidation, weekValidation, yearValidation


def __shouldValidate(kwargs) -> bool:
Expand Down
6 changes: 2 additions & 4 deletions leeger/exception/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from .InvalidTeamFormatException import InvalidTeamFormatException
from .InvalidWeekFormatException import InvalidWeekFormatException
from .InvalidYearFormatException import InvalidYearFormatException
from .InvalidYearSettingsFormatException import \
InvalidYearSettingsFormatException
from .InvalidYearSettingsFormatException import InvalidYearSettingsFormatException
from .LeagueLoaderException import LeagueLoaderException
from .UnsupportedLeegerFeatureException import \
UnsupportedLeegerFeatureException
from .UnsupportedLeegerFeatureException import UnsupportedLeegerFeatureException
3 changes: 1 addition & 2 deletions leeger/model/league/Matchup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

from leeger.enum.MatchupType import MatchupType
from leeger.exception import DoesNotExistException
from leeger.exception.InvalidMatchupFormatException import \
InvalidMatchupFormatException
from leeger.exception.InvalidMatchupFormatException import InvalidMatchupFormatException
from leeger.model.abstract.EqualityCheck import EqualityCheck
from leeger.model.abstract.UniqueId import UniqueId
from leeger.model.league_helper.Performance import Performance
Expand Down
8 changes: 5 additions & 3 deletions leeger/util/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@

from leeger.model.filter import AllTimeFilters, YearFilters
from leeger.model.league import League, Year
from leeger.util.excel_helper import (allTimeMatchupsStatSheet,
allTimeTeamsStatSheet,
yearMatchupsStatSheet)
from leeger.util.excel_helper import (
allTimeMatchupsStatSheet,
allTimeTeamsStatSheet,
yearMatchupsStatSheet,
)
from leeger.util.navigator.YearNavigator import YearNavigator
from leeger.util.stat_sheet import leagueStatSheet, yearStatSheet

Expand Down
69 changes: 36 additions & 33 deletions leeger/util/stat_sheet.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
from leeger.calculator.all_time_calculator import (
AWALAllTimeCalculator, TeamSummaryAllTimeCalculator)
from leeger.calculator.all_time_calculator.GameOutcomeAllTimeCalculator import \
GameOutcomeAllTimeCalculator
from leeger.calculator.all_time_calculator.PlusMinusAllTimeCalculator import \
PlusMinusAllTimeCalculator
from leeger.calculator.all_time_calculator.PointsScoredAllTimeCalculator import \
PointsScoredAllTimeCalculator
from leeger.calculator.all_time_calculator.ScoringShareAllTimeCalculator import \
ScoringShareAllTimeCalculator
from leeger.calculator.all_time_calculator.ScoringStandardDeviationAllTimeCalculator import \
ScoringStandardDeviationAllTimeCalculator
from leeger.calculator.all_time_calculator.SingleScoreAllTimeCalculator import \
SingleScoreAllTimeCalculator
from leeger.calculator.all_time_calculator.SmartWinsAllTimeCalculator import \
SmartWinsAllTimeCalculator
from leeger.calculator.all_time_calculator.SSLAllTimeCalculator import \
SSLAllTimeCalculator
AWALAllTimeCalculator,
TeamSummaryAllTimeCalculator,
)
from leeger.calculator.all_time_calculator.GameOutcomeAllTimeCalculator import (
GameOutcomeAllTimeCalculator,
)
from leeger.calculator.all_time_calculator.PlusMinusAllTimeCalculator import (
PlusMinusAllTimeCalculator,
)
from leeger.calculator.all_time_calculator.PointsScoredAllTimeCalculator import (
PointsScoredAllTimeCalculator,
)
from leeger.calculator.all_time_calculator.ScoringShareAllTimeCalculator import (
ScoringShareAllTimeCalculator,
)
from leeger.calculator.all_time_calculator.ScoringStandardDeviationAllTimeCalculator import (
ScoringStandardDeviationAllTimeCalculator,
)
from leeger.calculator.all_time_calculator.SingleScoreAllTimeCalculator import (
SingleScoreAllTimeCalculator,
)
from leeger.calculator.all_time_calculator.SmartWinsAllTimeCalculator import (
SmartWinsAllTimeCalculator,
)
from leeger.calculator.all_time_calculator.SSLAllTimeCalculator import SSLAllTimeCalculator
from leeger.calculator.year_calculator import (
ScoringStandardDeviationYearCalculator, SingleScoreYearCalculator,
TeamSummaryYearCalculator)
from leeger.calculator.year_calculator.AWALYearCalculator import \
AWALYearCalculator
from leeger.calculator.year_calculator.GameOutcomeYearCalculator import \
GameOutcomeYearCalculator
from leeger.calculator.year_calculator.PlusMinusYearCalculator import \
PlusMinusYearCalculator
from leeger.calculator.year_calculator.PointsScoredYearCalculator import \
PointsScoredYearCalculator
from leeger.calculator.year_calculator.ScoringShareYearCalculator import \
ScoringShareYearCalculator
from leeger.calculator.year_calculator.SmartWinsYearCalculator import \
SmartWinsYearCalculator
from leeger.calculator.year_calculator.SSLYearCalculator import \
SSLYearCalculator
ScoringStandardDeviationYearCalculator,
SingleScoreYearCalculator,
TeamSummaryYearCalculator,
)
from leeger.calculator.year_calculator.AWALYearCalculator import AWALYearCalculator
from leeger.calculator.year_calculator.GameOutcomeYearCalculator import GameOutcomeYearCalculator
from leeger.calculator.year_calculator.PlusMinusYearCalculator import PlusMinusYearCalculator
from leeger.calculator.year_calculator.PointsScoredYearCalculator import PointsScoredYearCalculator
from leeger.calculator.year_calculator.ScoringShareYearCalculator import ScoringShareYearCalculator
from leeger.calculator.year_calculator.SmartWinsYearCalculator import SmartWinsYearCalculator
from leeger.calculator.year_calculator.SSLYearCalculator import SSLYearCalculator
from leeger.model.league import League, Year
from leeger.model.stat.AllTimeStatSheet import AllTimeStatSheet
from leeger.model.stat.YearStatSheet import YearStatSheet
Expand Down
3 changes: 1 addition & 2 deletions leeger/validate/divisionValidation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from leeger.exception.InvalidDivisionFormatException import \
InvalidDivisionFormatException
from leeger.exception.InvalidDivisionFormatException import InvalidDivisionFormatException
from leeger.model.league.Division import Division


Expand Down
3 changes: 1 addition & 2 deletions leeger/validate/leagueValidation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from functools import lru_cache

from leeger.exception.InvalidLeagueFormatException import \
InvalidLeagueFormatException
from leeger.exception.InvalidLeagueFormatException import InvalidLeagueFormatException
from leeger.model.league.League import League
from leeger.model.league.Owner import Owner
from leeger.model.league.Year import Year
Expand Down
3 changes: 1 addition & 2 deletions leeger/validate/matchupValidation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from leeger.enum.MatchupType import MatchupType
from leeger.exception.InvalidMatchupFormatException import \
InvalidMatchupFormatException
from leeger.exception.InvalidMatchupFormatException import InvalidMatchupFormatException
from leeger.model.league.Matchup import Matchup


Expand Down
3 changes: 1 addition & 2 deletions leeger/validate/ownerValidation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from leeger.exception.InvalidOwnerFormatException import \
InvalidOwnerFormatException
from leeger.exception.InvalidOwnerFormatException import InvalidOwnerFormatException
from leeger.model.league.Owner import Owner


Expand Down
3 changes: 1 addition & 2 deletions leeger/validate/teamValidation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from leeger.exception.InvalidTeamFormatException import \
InvalidTeamFormatException
from leeger.exception.InvalidTeamFormatException import InvalidTeamFormatException
from leeger.model.league.Team import Team


Expand Down
3 changes: 1 addition & 2 deletions leeger/validate/weekValidation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from leeger.enum.MatchupType import MatchupType
from leeger.exception.InvalidWeekFormatException import \
InvalidWeekFormatException
from leeger.exception.InvalidWeekFormatException import InvalidWeekFormatException
from leeger.model.league.Matchup import Matchup
from leeger.model.league.Week import Week
from leeger.validate import matchupValidation
Expand Down
11 changes: 7 additions & 4 deletions leeger/validate/yearValidation.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
from functools import lru_cache

from leeger.exception.InvalidYearFormatException import \
InvalidYearFormatException
from leeger.exception.InvalidYearFormatException import InvalidYearFormatException
from leeger.model.league import Matchup, YearSettings
from leeger.model.league.Division import Division
from leeger.model.league.Team import Team
from leeger.model.league.Week import Week
from leeger.model.league.Year import Year
from leeger.util.navigator import YearNavigator
from leeger.validate import (divisionValidation, teamValidation,
weekValidation, yearSettingsValidation)
from leeger.validate import (
divisionValidation,
teamValidation,
weekValidation,
yearSettingsValidation,
)


@lru_cache(maxsize=None)
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ skip-magic-trailing-comma = true
include = '\.py$'
quiet = true

[tool.isort]
profile = "black"
line_length = 100

[autoflake]
ignore_init_module_imports = true
in_place = true
recursive = true
remove_all_unused_imports = true
in_place = true
Loading

0 comments on commit b72ba6a

Please sign in to comment.