mypy: zulip: Annotate integrations/perforce/zulip_perforce_config.py.
This commit is contained in:
parent
7ad3324aaa
commit
ab192fe937
|
@ -19,7 +19,6 @@ os.chdir(os.path.dirname(TOOLS_DIR))
|
||||||
sys.path.append(os.path.dirname(TOOLS_DIR))
|
sys.path.append(os.path.dirname(TOOLS_DIR))
|
||||||
|
|
||||||
exclude = """
|
exclude = """
|
||||||
zulip/integrations/perforce/zulip_perforce_config.py
|
|
||||||
zulip/integrations/perforce/git_p4.py
|
zulip/integrations/perforce/git_p4.py
|
||||||
zulip/integrations/svn/zulip_svn_config.py
|
zulip/integrations/svn/zulip_svn_config.py
|
||||||
zulip/integrations/zephyr/process_ccache
|
zulip/integrations/zephyr/process_ccache
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
|
from typing import Dict, Optional, Text
|
||||||
|
|
||||||
# Change these values to configure authentication for the plugin
|
# Change these values to configure authentication for the plugin
|
||||||
ZULIP_USER = "p4-bot@example.com"
|
ZULIP_USER = "p4-bot@example.com"
|
||||||
|
@ -50,6 +51,7 @@ P4_WEB = None
|
||||||
# * stream "depot_subdirectory-commits"
|
# * stream "depot_subdirectory-commits"
|
||||||
# * subject "change_root"
|
# * subject "change_root"
|
||||||
def commit_notice_destination(path, changelist):
|
def commit_notice_destination(path, changelist):
|
||||||
|
# type: (Text, int) -> Optional[Dict[Text, Text]]
|
||||||
dirs = path.split('/')
|
dirs = path.split('/')
|
||||||
if len(dirs) >= 4 and dirs[3] not in ("*", "..."):
|
if len(dirs) >= 4 and dirs[3] not in ("*", "..."):
|
||||||
directory = dirs[3]
|
directory = dirs[3]
|
||||||
|
|
Loading…
Reference in a new issue