Skip to content

Commit 2a7d055

Browse files
committed
Fixed linting issues. by: Conrad, Giles
1 parent 9734daa commit 2a7d055

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pythonanywhere/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def set_ssl(self, certificate, private_key):
157157
dedent(
158158
"""
159159
POST to set SSL details via API failed, got {response}:{response_text}
160-
If you just created an API token, you need to set the API_TOKEN environment variable or start a new console.
161-
Also you need to have setup a `{domain}` PythonAnywhere webapp for this to work.
160+
If you just created an API token, you need to set the API_TOKEN environment variable or start a
161+
new console. Also you need to have setup a `{domain}` PythonAnywhere webapp for this to work.
162162
"""
163163
).format(response=response, response_text=response.text, domain=self.domain)
164164
)
@@ -228,7 +228,7 @@ def get_log_info(self):
228228
log_prefix = "/var/log/{domain}.".format(domain=self.domain)
229229
for file_name in file_list:
230230
if type(file_name) == str and file_name.startswith(log_prefix):
231-
log = file_name[len(log_prefix) :].split(".")
231+
log = file_name[len(log_prefix):].split(".")
232232
if log[0] in log_types:
233233
log_type = log[0]
234234
if log[-1] == "log":

tests/test_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ def test_gets_domain_from_pythonanywhere_site_and_ignores_pythonanywhere_domain_
2121
monkeypatch.setenv("PYTHONANYWHERE_DOMAIN", "wibble.com")
2222
assert get_api_endpoint() == "https://www.foo.com/api/v0/user/{username}/{flavor}/"
2323

24-
def test_gets_domain_from_pythonanywhere_domain_and_adds_on_www_if_set_but_no_pythonanywhere_site(self, monkeypatch):
24+
def test_gets_domain_from_pythonanywhere_domain_and_adds_on_www_if_set_but_no_pythonanywhere_site(
25+
self, monkeypatch
26+
):
2527
monkeypatch.setenv("PYTHONANYWHERE_DOMAIN", "foo.com")
2628
assert get_api_endpoint() == "https://www.foo.com/api/v0/user/{username}/{flavor}/"
2729

0 commit comments

Comments
 (0)