opensourcerouting / frr

Free Range Routing Protocol Suite
Other
37 stars 14 forks source link

Topotato: Revamp json_cmp and add new directive: JSONCompareShouldNotExist #94

Open eznix86 opened 1 year ago

eznix86 commented 1 year ago

fixes problem with #90 and make json_cmp more "readable"*

*need your opinion @eqvinox

eqvinox commented 1 year ago

pylint:

************* Module topotato.utils
topotato/utils.py:85:0: C0303: Trailing whitespace (trailing-whitespace)
topotato/utils.py:226:0: C0303: Trailing whitespace (trailing-whitespace)
topotato/utils.py:228:0: C0303: Trailing whitespace (trailing-whitespace)
topotato/utils.py:259:0: C0303: Trailing whitespace (trailing-whitespace)
topotato/utils.py:207:16: R1724: Unnecessary "else" after "continue", remove the "else" and de-indent the code inside it (no-else-continue)
topotato/utils.py:213:16: R1724: Unnecessary "else" after "continue", remove the "else" and de-indent the code inside it (no-else-continue)
topotato/utils.py:231:16: R1723: Unnecessary "elif" after "break", remove the leading "el" from "elif" (no-else-break)
topotato/utils.py:190:0: R0912: Too many branches (20/12) (too-many-branches)
topotato/utils.py:265:0: R0914: Too many local variables (17/15) (too-many-locals)

also needs black run (which would fix all the C0303)

eqvinox commented 1 year ago

I'm also a bit unsure about changes in behavior tbh, there was some tricky edge cases to cover…

eqvinox commented 1 year ago

Still has these pylint warnings:

topotato/utils.py:209:16: R1724: Unnecessary "else" after "continue", remove the "else" and de-indent the code inside it (no-else-continue)
topotato/utils.py:215:16: R1724: Unnecessary "else" after "continue", remove the "else" and de-indent the code inside it (no-else-continue)
topotato/utils.py:243:16: R1723: Unnecessary "elif" after "break", remove the leading "el" from "elif" (no-else-break)
topotato/utils.py:190:0: R0912: Too many branches (20/12) (too-many-branches)
topotato/utils.py:288:0: R0914: Too many local variables (17/15) (too-many-locals)
eznix86 commented 1 year ago

fixed:

eqvinox commented 1 year ago

rebased to topotato-base