8000 Axsuarez/pylint and black hook (#274) · sherlock666/botbuilder-python@b0e444a · GitHub
[go: up one dir, main page]

Skip to content

Commit b0e444a

Browse files
authored
Axsuarez/pylint and black hook (microsoft#274)
1 parent 0bfda9e commit b0e444a

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
default_stages: [push]
2+
repos:
3+
- repo: https://github.com/pre-commit/mirrors-pylint
4+
rev: v2.3.1
5+
hooks:
6+
- id: pylint
7+
files: libraries
8+
args: [--rcfile=.pylintrc]
9+
verbose: true

.pylintrc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ extension-pkg-whitelist=
77

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

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

1616
# Python code to execute, usually for sys.path manipulation such as
1717
# pygtk.require().
@@ -155,7 +155,8 @@ disable=print-statement,
155155
cyclic-import,
156156
too-many-locals,
157157
too-many-function-args,
158-
too-many-return-statements
158+
too-many-return-statements,
159+
import-error
159160

160161
# Enable the message, report, category or checker with the given id(s). You can
161162
# either give multiple identifier separated by comma (,) or put this option

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[![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)
77
[![roadmap badge](https://img.shields.io/badge/visit%20the-roadmap-blue.svg)](https://github.com/Microsoft/botbuilder-python/wiki/Roadmap)
88
[![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)
9+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
910

1011
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.
1112

libraries/botbuilder-applicationinsights/botbuilder/applicationinsights/application_insights_telemetry_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,22 @@ def track_exception(
103103
self,
104104
exception_type: type = None,
105105
value: Exception = None,
106-
tb: traceback = None,
106+
trace: traceback = None,
107107
properties: Dict[str, object] = None,
108108
measurements: Dict[str, object] = None,
109109
) -> None:
110110
"""
111111
Send information about a single exception that occurred in the application.
112112
:param exception_type: the type of the exception that was thrown.
113113
:param value: the exception that the client wants to send.
114-
:param tb: the traceback information as returned by :func:`sys.exc_info`.
114+
:param trace: the traceback information as returned by :func:`sys.exc_info`.
115115
:param properties: the set of custom properties the client wants attached to this data item.
116116
(defaults to: None)
117117
:param measurements: the set of custom measurements the client wants to attach to this data item.
118118
(defaults to: None)
119119
"""
120120
self._client.track_exception(
121-
exception_type, value, tb, properties, measurements
121+
exception_type, value, trace, properties, measurements
122122
)
123123

124124
def track_event(

libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/choice_prompt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from typing import Callable, Dict, List, Union
55

6+
from recognizers_text import Culture
67
from botbuilder.core import TurnContext
78
from botbuilder.dialogs.choices import (
89
Choice,
@@ -12,7 +13,6 @@
1213
ListStyle,
1314
)
1415
from botbuilder.schema import Activity, ActivityTypes
15-
from recognizers_text import Culture
1616

1717
from .prompt import Prompt
1818
from .prompt_options import PromptOptions

libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/datetime_prompt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Licensed under the MIT License.
33

44
from typing import Dict
5+
from recognizers_date_time import recognize_datetime
56
from botbuilder.core.turn_context import TurnContext
67
from botbuilder.schema import ActivityTypes
7-
from recognizers_date_time import recognize_datetime
88
from .datetime_resolution import DateTimeResolution
99
from .prompt import Prompt
1010
from .prompt_options import PromptOptions

0 commit comments

Comments
 (0)
0