Skip to content

Git lint #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: CI
Choose a base branch
from
Open

Git lint #1

wants to merge 24 commits into from

Conversation

LoopThrough-i-j
Copy link
Owner

No description provided.

Tests for dropbox_share bot fails for version >= 11.0.0.
@LoopThrough-i-j LoopThrough-i-j force-pushed the CI branch 2 times, most recently from 0ab22f3 to 2f99c97 Compare February 3, 2021 23:25
ahmedabuamra and others added 6 commits February 18, 2021 18:35
The issue linked to this commit suggest suggests to replace the avatar
with the username only, I just needed to remove !avatar as the code
already shows the username.

Fixes part of zulip#632.
Update `reaction_data` type in add_reaction and
remove_reaction, from Dict[str, str] to Dict[str, Any]
This matches the current configuration in zulip/zulip.
@LoopThrough-i-j LoopThrough-i-j force-pushed the git-lint branch 2 times, most recently from 1889390 to 4b4f6b4 Compare February 25, 2021 01:32
- Replace virtualenv with python 3's native venv feature. The venv used is native to
  python3.5+, so there's no need for a separate dependency.
- Remove redundant activation script. An activation script is required
  to use the pip and python in the virtual environment, but because we're
  calling the pip inside the venv, we don't need one.

Fixes zulip#625.
@LoopThrough-i-j LoopThrough-i-j force-pushed the git-lint branch 5 times, most recently from 7ceb832 to 7585161 Compare February 25, 2021 04:22
LoopThrough-i-j and others added 10 commits February 26, 2021 07:32
The `BotStorage` Protocol is created to add a common type to all
storage classes.

Note: Protocol is imported from `typing_extensions` as `typing`
doesn't provide Protocol for python <= 3.7.
- The `BotHandler` Protocol is a mypy Protocol
  s.t. all BotHandlers can use it as a default type.
- Fix ExternalBotHandler and StubBotHandler to
  follow `BotHandler` Protocol

Fixes part of zulip#639
- Set `bot_handler` type to `BotHandler`.
- Fix mypy issues in improperly typed variables, params and returns.

Fixes part of zulip#639
The functions `extract_query_without_mention` and
`is_private_message_but_not_group_pm` now accept `BotHandler`
instead of `ExternalBotHandler` which allows passing objects of both
`EmbeddedBotHandler` and `ExternalBotHandler`.

Fixes zulip#639
mypy version 0.770 has a bug where it raises false "syntax error in type
comment" warnings on Python 3.9
python/mypy#8627
It has been fixed.

zulint had a bug where it raised UnicodeDecodeError while running on
Windows, which has been fixed.
zulip/zulint@14e3974
Tests were failing on Windows since paths are case-insensitive on it.
This uses pathlib library to compare paths on all platforms.

Fixes zulip#651
Set and Fetch upstream is required for gitlint, while
setting up development env.
Setup gitlint for developers to write well formatted
commit messages.

Note: .gitlint, gitlint-rules.py and lint-commits
are taken directly from zulip/zulip with minor changes.
andersk added 4 commits March 4, 2021 14:04
zulint already has --skip for this.

Signed-off-by: Anders Kaseorg <[email protected]>
The only thing it did over ‘tools/lint --skip=gitlint’ was redundantly
run mypy again.

Signed-off-by: Anders Kaseorg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants