Skip to content

Commit 505c656

Browse files
authored
Merge pull request #153 from CiscoTestAutomation/tasarath_fix_syntax_warnings
Fix syntax warning
2 parents 571fc95 + dcd9fdc commit 505c656

File tree

5 files changed

+27
-5
lines changed

5 files changed

+27
-5
lines changed

connector/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ PYTHON = python3
3232
TESTCMD = cd tests; runAll
3333
DISTDIR = $(BUILDDIR)/dist
3434

35+
DEPENDENCIES = "paramiko >= 1.15.1" "lxml >= 3.3.0, <5.0.0" \
36+
"ncclient >= 0.6.6" grpcio protobuf
37+
38+
3539
.PHONY: clean package distribute distribute_staging distribute_staging_external\
3640
develop undevelop populate_dist_dir help docs distribute_docs test
3741

@@ -85,7 +89,8 @@ develop:
8589
@echo ""
8690

8791
@pip3 uninstall -y yang.connector || true
88-
@$(PYTHON) setup.py develop -q
92+
@pip install $(DEPENDENCIES)
93+
@pip install -e . --no-deps
8994

9095
@echo "Completed building and installing: $@"
9196
@echo ""
@@ -98,7 +103,7 @@ undevelop:
98103
@echo "Uninstalling $(PKG_NAME) development distributable: $@"
99104
@echo ""
100105

101-
@$(PYTHON) setup.py develop -q --uninstall
106+
@pip uninstall $(PKG_NAME) -y
102107

103108
@echo "Completed uninstalling: $@"
104109
@echo ""
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--------------------------------------------------------------------------------
2+
Fix
3+
--------------------------------------------------------------------------------
4+
* yang.connector
5+
* Deprecated python3 setup.py
6+
* Fix syntax warning

ncdiff/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ PYTHON = python3
3232
TESTCMD = cd tests; runAll
3333
DISTDIR = $(BUILDDIR)/dist
3434

35+
DEPENDENCIES = "pyang >= 1.7.3" "ncclient >= 0.6.3" \
36+
"requests >= 2.18.4" "xmljson >= 0.1.9" \
37+
"yang.connector >= 3.0.0"
38+
3539
.PHONY: clean package distribute distribute_staging distribute_staging_external\
3640
develop undevelop populate_dist_dir help docs distribute_docs test
3741

@@ -84,7 +88,8 @@ develop:
8488
@echo ""
8589

8690
@pip3 uninstall -y yang.ncdiff || true
87-
@$(PYTHON) setup.py develop -q
91+
@pip install $(DEPENDENCIES)
92+
@pip install -e . --no-deps
8893

8994
@echo "Completed building and installing: $@"
9095
@echo ""
@@ -97,7 +102,7 @@ undevelop:
97102
@echo "Uninstalling $(PKG_NAME) development distributable: $@"
98103
@echo ""
99104

100-
@$(PYTHON) setup.py develop -q --uninstall
105+
@pip uninstall $(PKG_NAME) -y
101106

102107
@echo "Completed uninstalling: $@"
103108
@echo ""
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--------------------------------------------------------------------------------
2+
Fix
3+
--------------------------------------------------------------------------------
4+
* yang.ncdiff
5+
* Deprecated python3 setup.py
6+
* Fix syntax warning

ncdiff/src/yang/ncdiff/ref.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def parse_square_bracket(self, to_node=None):
362362
self.cut(start_idx+1, end_idx-2, tag, 2)
363363
start_idx = None
364364
else:
365-
if re.search('^\[[1-9][0-9]*\]$', substring):
365+
if re.search(r'^\[[1-9][0-9]*\]$', substring):
366366
numbers = substring[1:-1]
367367
self.cut(start_idx+1, end_idx-1, numbers, 2)
368368
else:

0 commit comments

Comments
 (0)