[Pkg-privacy-commits] [onionshare] 06/55: Improve pep8 conformance
Ulrike Uhlig
u-guest at moszumanska.debian.org
Thu Sep 8 10:26:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch debian
in repository onionshare.
commit 17e389b80070ace755b28f3a77bdb4121f445417
Author: jvoisin <julien.voisin at dustri.org>
Date: Mon Apr 18 01:40:17 2016 +0200
Improve pep8 conformance
---
onionshare/helpers.py | 2 +-
onionshare/onionshare.py | 2 +-
onionshare/strings.py | 2 +-
onionshare/web.py | 3 +--
test/onionshare_helpers_test.py | 2 --
test/onionshare_strings_test.py | 1 -
test/onionshare_test.py | 1 -
test/test_helpers.py | 5 ++---
8 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/onionshare/helpers.py b/onionshare/helpers.py
index ae58488..3080538 100644
--- a/onionshare/helpers.py
+++ b/onionshare/helpers.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
-import sys, os, inspect, hashlib, base64, hmac, platform, zipfile, tempfile, math, time
+import sys, os, inspect, hashlib, base64, platform, zipfile, tempfile, math, time
from random import SystemRandom
diff --git a/onionshare/onionshare.py b/onionshare/onionshare.py
index 0ccf394..f9c0786 100644
--- a/onionshare/onionshare.py
+++ b/onionshare/onionshare.py
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
-import os, sys, subprocess, time, argparse, inspect, shutil, socket, threading
+import os, sys, time, argparse, shutil, socket, threading
from . import strings, helpers, web, hs
diff --git a/onionshare/strings.py b/onionshare/strings.py
index 61235e2..116f115 100644
--- a/onionshare/strings.py
+++ b/onionshare/strings.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
-import json, locale, sys, os
+import json, locale, os
from . import helpers
diff --git a/onionshare/web.py b/onionshare/web.py
index 6aba1c7..958e8c3 100644
--- a/onionshare/web.py
+++ b/onionshare/web.py
@@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import queue, mimetypes, platform, os, sys
from urllib.request import urlopen
from flask import Flask, Response, request, render_template_string, abort
-from functools import wraps
from . import strings, helpers
@@ -231,7 +230,7 @@ def download(slug_candidate):
# The user has canceled the download, so stop serving the file
if client_cancel:
add_request(REQUEST_CANCELED, path, {'id': download_id})
- break;
+ break
chunk = fp.read(chunk_size)
if chunk == b'':
diff --git a/test/onionshare_helpers_test.py b/test/onionshare_helpers_test.py
index b5c16ff..d8e896c 100644
--- a/test/onionshare_helpers_test.py
+++ b/test/onionshare_helpers_test.py
@@ -17,9 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from onionshare import helpers
-from nose import with_setup
-import test_helpers
def test_get_platform_returns_platform_system():
"""get_platform() returns platform.system() when ONIONSHARE_PLATFORM is not defined"""
diff --git a/test/onionshare_strings_test.py b/test/onionshare_strings_test.py
index 250df28..819c1e8 100644
--- a/test/onionshare_strings_test.py
+++ b/test/onionshare_strings_test.py
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import locale
from onionshare import strings
-from nose import with_setup
def test_starts_with_empty_strings():
diff --git a/test/onionshare_test.py b/test/onionshare_test.py
index 20a0022..a0c77fa 100644
--- a/test/onionshare_test.py
+++ b/test/onionshare_test.py
@@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import socket
from onionshare import OnionShare
-from nose import with_setup
def test_choose_port_returns_a_port_number():
diff --git a/test/test_helpers.py b/test/test_helpers.py
index 2ddc1e1..b07021c 100644
--- a/test/test_helpers.py
+++ b/test/test_helpers.py
@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import tempfile
+import os
class MockSubprocess():
@@ -31,9 +32,7 @@ class MockSubprocess():
def write_tempfile(text):
- tempdir = tempfile.mkdtemp()
- path = tempdir + "/test-file.txt"
+ path = os.path.join(tempfile.mkdtemp(), "/test-file.txt")
with open(path, "w") as f:
f.write(text)
- f.close()
return path
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git
More information about the Pkg-privacy-commits
mailing list