8000 Axsuarez/pylint and black hook by axelsrz · Pull Request #274 · microsoft/botbuilder-python · GitHub
[go: up one dir, main page]

Skip to content

Axsuarez/pylint and black hook #274

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

Merged
merged 21 commits into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
default_stages: [push]
repos:
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.3.1
hooks:
- id: pylint
files: libraries
args: [--rcfile=.pylintrc]
verbose: true
7 changes: 4 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ extension-pkg-whitelist=

# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
ignore=CVS,build,botbuilder-schema,samples,django_tests,Generator

# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns=
ignore-patterns=setup.py,azure_bdist_wheel.py

# Python code to execute 8000 , usually for sys.path manipulation such as
# pygtk.require().
Expand Down Expand Up @@ -155,7 +155,8 @@ disable=print-statement,
cyclic-import,
too-many-locals,
too-many-function-args,
too-many-return-statements
too-many-return-statements,
import-error

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Build status](https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/Python/SDK_v4-Python-CI)](https://fuselabs.visualstudio.com/SDK_v4/_build/latest?definitionId=431)
[![roadmap badge](https://img.shields.io/badge/visit%20the-roadmap-blue.svg)](https://github.com/Microsoft/botbuilder-python/wiki/Roadmap)
[![Coverage Status](https://coveralls.io/repos/github/microsoft/botbuilder-python/badge.svg?branch=axsuarez/formatting-and-style)](https://coveralls.io/github/microsoft/botbuilder-python?branch=axsuarez/formatting-and-style)
[![Code style: black](https://img.shields.io/badge/code%20sty 8000 le-black-000000.svg)](https://github.com/psf/black)

This repository contains code for the Python version of the [Microsoft Bot Framework SDK](https://github.com/Microsoft/botbuilder). The Bot Framework SDK v4 enables developers to model conversation and build sophisticated bot applications using Python. This Python version is in **Preview** state and is being actively developed.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,22 @@ def track_exception(
self,
exception_type: type = None,
value: Exception = None,
tb: traceback = None,
trace: traceback = None,
properties: Dict[str, object] = None,
measurements: Dict[str, object] = None,
) -> None:
"""
Send information about a single exception that occurred in the application.
:param exception_type: the type of the exception that was thrown.
:param value: the exception that the client wants to send.
:param tb: the traceback information as returned by :func:`sys.exc_info`.
:param trace: the traceback information as returned by :func:`sys.exc_info`.
:param properties: the set of custom properties the client wants attached to this data item.
(defaults to: None)
:param measurements: the set of custom measurements the client wants to attach to this data item.
(defaults to: None)
"""
self._client.track_exception(
exception_type, value, tb, properties, measurements
exception_type, value, trace, properties, measurements
)

def track_event(
Expand Down
9F5A
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from typing import Callable, Dict, List, Union

from recognizers_text import Culture
from botbuilder.core import TurnContext
from botbuilder.dialogs.choices import (
Choice,
Expand All @@ -12,7 +13,6 @@
ListStyle,
)
from botbuilder.schema import Activity, ActivityTypes
from recognizers_text import Culture

from .prompt import Prompt
from .prompt_options import PromptOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Licensed under the MIT License.

from typing import Dict
from recognizers_date_time import recognize_datetime
from botbuilder.core.turn_context import TurnContext
from botbuilder.schema import ActivityTypes
from recognizers_date_time import recognize_datetime
from .datetime_resolution import DateTimeResolution
from .prompt import Prompt
from .prompt_options import PromptOptions
Expand Down
0