requirements: Upgrade pyflakes.

Pyflakes has been upgraded from 2.0.0 to 2.1.0 and
a few new linter errors have been fixed.

Fixes #11397.
This commit is contained in:
Shoumorup 2019-02-01 18:38:45 +05:30 committed by Tim Abbott
parent 893e1475bb
commit e8ba08367b
6 changed files with 7 additions and 7 deletions

View File

@ -29,7 +29,7 @@ isort==4.3.4
pycodestyle==2.5.0
# Needed to run pyflakes linter
pyflakes==2.0.0
pyflakes==2.1.0
# Needed to run tests in parallel
tblib==1.3.2

View File

@ -126,7 +126,7 @@ pycparser==2.19 # via cffi
pycrypto==2.6.1
pycryptodome==3.7.3 # via python-jose
pydispatcher==2.0.5 # via scrapy
pyflakes==2.0.0
pyflakes==2.1.0
pygments==2.3.1
pyhamcrest==1.9.0 # via twisted
pyjwt==1.7.1

View File

@ -11,4 +11,4 @@ LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.org/2018/11/07/zulip-1-9-relea
# Typically, adding a dependency only requires a minor version bump, and
# removing a dependency requires a major version bump.
PROVISION_VERSION = '27.5'
PROVISION_VERSION = '28.0'

View File

@ -12,6 +12,7 @@ from django.utils.translation import ugettext as _
from zerver.lib.exceptions import JsonableError, ErrorCode, \
InvalidJSONError
from zerver.lib.types import ViewFuncT
from django.http import HttpRequest, HttpResponse
@ -125,8 +126,7 @@ class REQ:
# Note that this can't be used in helper functions which are not
# expected to call json_error or json_success, as it uses json_error
# internally when it encounters an error
def has_request_variables(view_func):
# type: (Callable[[HttpRequest, Any, Any], HttpResponse]) -> Callable[[HttpRequest, *Any, **Any], HttpResponse]
def has_request_variables(view_func: ViewFuncT) -> ViewFuncT:
num_params = view_func.__code__.co_argcount
if view_func.__defaults__ is None:
num_default_params = 0

View File

@ -620,7 +620,7 @@ class TestStreamEmailMessagesSubjectStripping(ZulipTestCase):
process_message(incoming_valid_message)
message = most_recent_message(user_profile)
if subject['stripped_subject'] is not "":
if subject['stripped_subject'] != "":
expected_topic = subject['stripped_subject']
else:
expected_topic = "(no topic)"

View File

@ -136,7 +136,7 @@ class ChangeSettingsTest(ZulipTestCase):
# doesn't work for it.
#
# TODO: Make this work more like do_test_realm_update_api
if notification_setting is not 'notification_sound':
if notification_setting != 'notification_sound':
self.check_for_toggle_param_patch("/json/settings/notifications",
notification_setting)