Commit Graph

21132 Commits

Author SHA1 Message Date
Greg Price 9ef68d6d42 run-mypy: Add --version to check the version of mypy used. 2017-09-27 12:22:03 -07:00
Greg Price c46755d48d run-mypy: Reorder CLI options for clearer --help. 2017-09-27 12:22:03 -07:00
Greg Price 6697e3620b run-mypy: Give CLI option help a consistent style.
Most CLI tools (including GNU tools and Mercurial) use lowercase
sentence fragments, with no period, for option glosses, so we
follow that style.  Also make the voice and wording consistent,
and the quote type in the Python source.
2017-09-27 12:22:03 -07:00
Greg Price 8c50f7f8a3 run-mypy: Remove extra exclude quirk for nonexistent "stubs" directory.
This exclusion was getting snuck in at the end bypassing --all (and so
giving the lie to the --help documentation).  There is no "stubs"
directory in the tree in any case.
2017-09-27 12:22:03 -07:00
Greg Price be5b26dc68 tools/run-mypy: Cut redundant data from CLI parsing.
argparse has reasonable default behavior for the `dest` argument,
and for `default` at least in these two obvious cases.
So cut those out where we're just doing the default thing.

Also rewrap a couple of calls to fit at least in 100 columns.
2017-09-27 12:22:03 -07:00
rht 2949d1c1e8 zerver: Remove the rest of absolute_import. 2017-09-27 10:02:39 -07:00
rht 7115a29bee zerver/webhooks: Remove absolute_import. 2017-09-27 10:00:39 -07:00
rht e239e97351 zerver/management: Remove absolute_import. 2017-09-27 10:00:39 -07:00
rht 41d8db373a zerver/worker: Remove absolute_import. 2017-09-27 10:00:39 -07:00
rht 1e87a4b68c zerver/tests: Remove absolute_import. 2017-09-27 10:00:39 -07:00
rht 74fd3d9f31 zerver/tornado: Remove absolute_import. 2017-09-27 10:00:39 -07:00
rht f43e54d352 zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
rht 15ca13c8de zerver/views: Remove absolute_import. 2017-09-27 10:00:39 -07:00
Robert Hönig fa8199819c linter: Remove unnecessary escape sequences in custom rules. 2017-09-27 09:02:44 -07:00
Robert Hönig 48696ac9a1 linter: Catch all malformatted string formatting clauses.
This also catches code like `"foo%s"%('bar')`, whereas before,
the first tuple entry could not be a string.
2017-09-27 09:02:44 -07:00
Robert Hönig 83eb22fc2f lister: Make excluding directories work on Windows. 2017-09-27 08:43:53 -07:00
Harshit Bansal ee6024281a org_settings: Fix dropup menu for notifications stream not opening.
We were having an anchor tag inside a button which is incorrect HTML.
Chrome and safari handle this case but firefox doesn't and hence the
dropup menu wasn't opening on firefox.
2017-09-26 23:04:49 -07:00
Brock Whittaker 5331e52f6d settings: Convert tables to use perfectScrollbar.
This converts tables in the organization section to use
perfectScrollbar.
2017-09-26 22:54:20 -07:00
Brock Whittaker 042132f156 settings: Fix default streams scrolling issue.
The progressively rendered table extends too far down, causing the page
to scroll needlessly, which then causes there to be two scrollbars — a
scrollbar for the table and a view scrollbar outside that.

Fixes: #6391.
2017-09-26 22:54:20 -07:00
Tim Abbott f0f0176517 test_auth_backends: Clean up Google auth subdomains handling.
This makes GoogleSubdomainLoginTest consistently access subdomains the
standard way, replacing the original hacky approach it had that
predated the library.
2017-09-26 22:20:07 -07:00
Tim Abbott 1c25bb5eba auth: Fix typo in invalid subdomain logging. 2017-09-26 22:20:05 -07:00
Tim Abbott 8d7f961a67 LDAP: Remove now-impossible except clause.
Since we made ZulipLDAPException a subclass of
_LDAPUser.AuthenticationFailed, the django-auth-ldap library already
handles catching it and returning None.

This fixes missing test coverage in this function introduced by
73e8bba379.
2017-09-26 21:33:50 -07:00
Greg Price 315f5b393b logging: Quiet pika.adapters.
This was giving a couple of lines of logs on every normal,
successful connection -- clearly a job for DEBUG, but emitted
on INFO.  Quiet it down.

Fixes #6674.
2017-09-26 21:00:52 -07:00
Greg Price 9e2b9893f9 logging: Organize logger configs for easier reference.
This is a pure reordering.
2017-09-26 21:00:41 -07:00
Greg Price 73e8bba379 ldap auth: Reassure django_auth_ldap our auth-failed exceptions are normal.
The main `authenticate` method in the django_auth_ldap package logs a message
at `exception` level if it passes through an exception it wasn't expecting.
Sensible practice, but we'd been passing through just such an exception for
any kind of routine authentication failure.  After we recently stopped suppressing
an arbitrary subset of loggers with `disable_existing_loggers`, these started
showing up noisily, including in tests.

So, make our exceptions expected.  Just like our own code, the upstream code
raises exceptions of a particular type for routine auth failures, and catches
them and just returns None.  We make our type derive from that one, so as to
just piggyback on that behavior.

Fixes an issue reported in a comment to #6674.
2017-09-26 21:00:41 -07:00
Steve Howell b340b28055 Extract get_service_bot_events().
There are several reasons to extract this function:

    * It's easy to unit test without extensive mocking.
    * It will show up when we profile code.
    * It is something that you can mostly ignore for
      most messages.

The main reason to extract this, though, is that we are about
to do some fairly complex splicing of data for the use case
of mentioning service bots on streams they are not subscribed to,
and we want to localize the complexity.
2017-09-26 18:49:03 -07:00
Brock Whittaker b2c4a25a7b Restyle invalid organization page.
This restyles the `invalid_realm.html` template that displays when
a subdomain does not lead to a valid organization.

Fixes: #6667.
2017-09-26 16:59:03 -07:00
Harshit Bansal ef4337edcb hotkey: Remap `+` key to use canonical name for thumbs up emoji. 2017-09-26 16:50:00 -07:00
Brock Whittaker 01b0a8156d /register/: Make the text error fall on own line.
This makes the text error fall on its own line rather than being inline
and pushing the checkbox over out of line with the rest of the elements.
2017-09-26 16:34:19 -07:00
Brock Whittaker baa87be5e2 Standardize error text color.
This standardizes the error text color to be the same in the
`.help-inline.text-error` class as it already is in other errors.
2017-09-26 16:34:19 -07:00
Rishi Gupta 8ec161ab77 portico: Update why-zulip.
Originally we wanted it to be short, since we were worried about attention
spans. But it seems like people are willing to read quite a bit when
choosing a chat product, and our "10 second" pitch should just be a video,
rather than a small amount of text.
2017-09-26 16:22:38 -07:00
Robert Hönig 43422fa6f2 outgoing webhook: Notify bot owner on failure response. 2017-09-26 16:11:27 -07:00
Robert Hönig c77b245944 backend tests: Add 'AARON' as bot owner of OUTGOING_WEBHOOK_BOT. 2017-09-26 16:11:27 -07:00
Brock Whittaker 8a8d1410f8 portico-signin: Fix organization name text overflow.
This fixes the issue on subdomain.zulipchat.com/login/ where the
organization name will have characters such as the lowercase "g"
cut off near the bottom due to the line-height being too small and
the overflow being hidden.

This re-arranges the properties to fix that issue.
2017-09-26 16:10:14 -07:00
Eeshan Garg bb34ba37b5 tools: Rename build_pygments_data.py -> build_pygments_data.
Dropping the file extension (.py) conforms to our naming
convention for such scripts.
2017-09-26 16:00:41 -07:00
Eeshan Garg 385eb4ce99 integrations: Add hubot to "Interactive bots" category. 2017-09-26 16:00:41 -07:00
Umair Khan 5d00f29c68 capitalization: Ignore LDAP. 2017-09-26 15:58:17 -07:00
Vishnu Ks 7fd4a71b7f test_emails: Generate emails instead of hardcoding.
Tweaked by tabbott to use require_GET.

Fixes #6344.
2017-09-26 15:02:47 -07:00
Vishnu Ks f58c87917e emails: Log emails that are queued or sent in dev environment.
Tweaked by tabbott to add some comments and clarify the code.
2017-09-26 15:02:47 -07:00
Tim Abbott bb1b771c44 topic_list: Fix a linter error. 2017-09-26 14:45:27 -07:00
Brock Whittaker be64c43cc5 emoji-popover: Add centered layout for mobile/responsive.
This adds a centered layout for mobile and responsive screens where the
emoji picker is guaranteed to be in the center of the screen, and the
rest of the screen darkens behind it.

Fixes: #6291.
2017-09-26 14:18:20 -07:00
Cynthia Lin 0fa8235c5d onboarding: Remove initial whitespace in Custom invitation message.
Fixes #6666.
2017-09-26 14:15:11 -07:00
Alena Volkova abe4196232 urls: Change the method for adding alert words from PUT to POST. 2017-09-26 14:00:51 -07:00
Alena Volkova ca687e01d7 urls: Remove the old POST endpoint for alert words. 2017-09-26 14:00:51 -07:00
Steve Howell b17fecbf06 Turn off more-topics features temporarily.
The features turned off by this commit require a bit more CSS
polish before we deploy them.  This commit should be reverted
to turn elements back on.
2017-09-26 13:58:54 -07:00
Steve Howell 0b25d3125d Add a help link for topics when we expand topics. 2017-09-26 13:58:54 -07:00
Steve Howell f4f193b5ca topic list: Scroll to the top earlier when zooming.
We want to scroll the left sidebar to the top as soon as the user
zooms in on a stream, and we don't want to wait for the server,
otherwise we'll get jumpiness.
2017-09-26 13:58:54 -07:00
Steve Howell 9f10cc62d6 Show a message when there are no more topics.
This commit is a bit complicated, because we do full redraws of
the topic list frequently, and we don't want to randomly obliterate
our "No more topics found" message, so we need to keep a bit of
extra state around.
2017-09-26 13:58:54 -07:00
Steve Howell cdfa3dea9a Add "searching..." indicator when loading more topics. 2017-09-26 13:58:54 -07:00
Steve Howell 490935249c Simplify rendering of "more topics" link.
We now use a template to render the "more topics" link.

We also remove an unnecessary conditional and an unnecessary
attribute.

Finally, our unit tests are a bit more granular now.
2017-09-26 13:58:54 -07:00