-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from cisco-ie/python2
Python 2 Support
- Loading branch information
Showing
10 changed files
with
38 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
## Custom | ||
.vscode/ | ||
Pipfile.lock | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
#!/usr/bin/env bash | ||
# Script which autoformats (black) and lints (pylint) code | ||
pipenv run black --safe --verbose --exclude proto src/cisco_gnmi | ||
# Many disabled to accomodate black disagreements... | ||
echo "Running black ..." | ||
FORMAT_COMMAND="black --safe --verbose --exclude proto src/cisco_gnmi" | ||
if black &> /dev/null; then | ||
eval $FORMAT_COMMAND | ||
elif pipenv run black &> /dev/null; then | ||
eval "pipenv run $FORMAT_COMMAND" | ||
else | ||
echo "black formatter not found on system, proceeding to pylint..." | ||
fi | ||
echo "Running pylint ..." | ||
# Many failures due to protos being runtime-functional and difficult to lint. | ||
pipenv run pylint --disable line-too-long --disable pointless-string-statement --disable no-member --disable wrong-import-position --disable bad-continuation src/cisco_gnmi/*.py | ||
pipenv run pylint --disable no-member --disable wrong-import-position --disable bad-continuation src/cisco_gnmi/*.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-i https://pypi.org/simple | ||
enum34 | ||
futures ; python_version < '3.2' | ||
grpcio | ||
protobuf | ||
six |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,4 @@ | |
from .client import Client | ||
from .xr import XRClient | ||
|
||
__version__ = "0.0.1" | ||
__version__ = "0.0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters