Skip to content

Commit

Permalink
v1.3
Browse files Browse the repository at this point in the history
- Added Immortal Rank
  • Loading branch information
marcusmunch committed Jul 6, 2018
2 parents 7f250ab + eb6a592 commit f90ebf2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 32 deletions.
21 changes: 11 additions & 10 deletions ranktier/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python


class Rank(object):

def __init__(self, rank):
Expand All @@ -18,23 +19,23 @@ def __init__(self, rank):

self.rank = rank


def __str__(cls):
return str(cls.name)


@property
def name(cls):
if cls.rank is None:
return None

elif cls.rank[0] == "8":
return "Immortal"

ranks = { "1" : "Herald"
, "2" : "Guardian"
, "3" : "Crusader"
, "4" : "Archon"
, "5" : "Legend"
, "6" : "Ancient"
, "7" : "Divine" }
ranks = {"1": "Herald",
"2": "Guardian",
"3": "Crusader",
"4": "Archon",
"5": "Legend",
"6": "Ancient",
"7": "Divine"}

return "{} [{}]".format(ranks[cls.rank[0]], cls.rank[1])
return "{} [{}]".format(ranks[cls.rank[0]], cls.rank[1])
44 changes: 22 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@


setup(name="ranktier",
version="1.2",
description="A Dota rank tier converter",
long_description="Ranktier turns two-digit rank tier numbers into human-readable output.",
url="https://github.com/marcusmunch/ranktier",
license="GPLv3",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
],
author="Marcus Grünewald",
author_email="[email protected]",
packages=["ranktier"])
version="1.3",
description="A Dota rank tier converter",
long_description="Ranktier turns two-digit rank tier numbers into human-readable output.",
url="https://github.com/marcusmunch/ranktier",
license="GPLv3",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
],
author="Marcus Grünewald",
author_email="[email protected]",
packages=["ranktier"])

0 comments on commit f90ebf2

Please sign in to comment.