Skip to content

Commit f82fb56

Browse files
committed
minor pep8 changes and workflow setup
1 parent 52c08d0 commit f82fb56

4 files changed

Lines changed: 17 additions & 15 deletions

File tree

‎.github/workflows/pythonpackage.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python package
4+
name: build
55

66
on:
77
push:

‎README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# python-kanka
1+
# python-kanka ![](https://github.com/rbtnx/python-kanka/workflows/build/badge.svg)
22
This is a python interface to the API from https://kanka.io. It's still early development so use it at your own risk.
33

44
To get started you need an API token. Create the client with
@@ -16,3 +16,5 @@ my_campaign.get_characters()
1616
char = my_campaign.character({character_id)
1717
char.entry
1818
```
19+
20+
Compatible with Python >= 3.6

‎kanka/objects/core.py‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,20 +135,20 @@ def map(self):
135135
:rtype: string
136136
"""
137137
return self._map
138-
139-
class Family(Entity):
138+
139+
class Family(Entity):
140140
"""
141141
Family entity.
142142
"""
143143
def __init__(self, data):
144144
self._location_id = data["location_id"]
145145
self._family_id = data["family_id"]
146-
146+
147147
members = data["members"]["data"]
148148
self._members = [Character(c) for c in members]
149149

150150
super(Family, self).__init__(data)
151-
151+
152152
def __repr__(self):
153153
return "Family: {} (id: {})".format(self._name, self._id)
154154

@@ -184,12 +184,12 @@ def __init__(self, data):
184184
self._location_id = data["location_id"]
185185
self._organisation_id = data["family_id"]
186186
self._type = data["type"]
187-
187+
188188
members = data["members"]["data"]
189189
self._members = [Character(c) for c in members]
190190

191191
super(Organisation, self).__init__(data)
192-
192+
193193
def __repr__(self):
194194
return "Organisation: {} (id: {})".format(self._name, self._id)
195195

@@ -224,7 +224,7 @@ def members(self):
224224
:rtype: list of Entity::Character
225225
"""
226226
return self._members
227-
227+
228228
class Item(Entity):
229229
"""
230230
Item entity.
@@ -233,28 +233,28 @@ def __init__(self, data):
233233
self._location_id = data["location_id"]
234234
self._character_id = data["character_id"]
235235
self._type = data["type"]
236-
236+
237237
super(Item, self).__init__(data)
238-
238+
239239
def __repr__(self):
240240
return "Item: {} (id: {})".format(self._name, self._id)
241-
241+
242242
@property
243243
def location_id(self):
244244
"""
245245
:return: Location ID
246246
:rtype: integer
247247
"""
248248
return self._location_id
249-
249+
250250
@property
251251
def character_id(self):
252252
"""
253253
:return: Character ID
254254
:rtype: integer
255255
"""
256256
return self._character_id
257-
257+
258258
@property
259259
def type(self):
260260
"""

‎kanka/objects/user.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ def __repr__(self):
117117
return "Name: {} (id: {})".format(self.name, self.id)
118118

119119
def __str__(self):
120-
return self.__repr__()
120+
return self.__repr__()

0 commit comments

Comments
 (0)