style: ruff format and the lint rules of the driver standard
Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM driver uses (E, F, I, UP, B at line length 100, Python 3.10). What ruff cannot fix comes in the next commit.
This commit is contained in:
1 parent
7f2ae6ac58
commit
a212bc8715
14 files changed
+322
-239
No files matched your search
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
@@ -145,7 +144,7 @@ class OpenWrtRoutingMixin:
|
||||
# "192.168.1.0/24 dev ..." → prefix as-is
|
||||
if line_s.startswith("default"):
|
||||
prefix = "0.0.0.0/0"
|
||||
rest = line_s[len("default"):].strip()
|
||||
rest = line_s[len("default") :].strip()
|
||||
else:
|
||||
parts = line_s.split()
|
||||
prefix = parts[0]
|
||||
|
||||
Reference in new issue
Block a user