summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-06-29 10:28:43 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-06-29 15:10:10 +0300
commit094928ba02bbabf3807ebe8f5ae77b957435d288 (patch)
treeb435c65401c374221735a47f18fbee7be7ea4301 /python
parentfe27e9cedb1bc7a91095a19d1867cfda428e12fe (diff)
downloadvyos-1x-094928ba02bbabf3807ebe8f5ae77b957435d288.tar.gz
vyos-1x-094928ba02bbabf3807ebe8f5ae77b957435d288.zip
ci: T8490: fix typos in comments, strings, and local identifiers
Reaches a clean typos baseline for the T8490 ruleset pilot. Categories: - Comments/docs: recursivly, taret, passsed, characted, arhive, AtrributeError; "ned" -> "new" (migration comments). - Messages/strings: writeable -> writable (x5); OCaml log "Commandis" -> "Command is". - Local variables (all refs in-function): commited, formating, presistent; inpt_range -> input_range; tz_datas -> tz_data_raw (avoids the tz_data collision). - Self-contained renames (definition + all references in-file): formated_stats, _get_formatted_output_conections -> ..._connections, expension_failure -> expansion_failure (ping + traceroute), snmpd_restart_reqired -> ..._required. False positives are allowlisted centrally (vyos/.github, separate PR), NOT changed here: mke2fs, Maya-calendar "Mak", RFC 4122 "IDentifier" (hostapd), and VPP's "U-Forwrd" bridge-domain column header (op_mode/vpp.py + the VPP smoketest assert the real upstream `vppctl` output). Verified: typos clean, py_compile of every edited .py, zero remaining old-identifier references. 🤖 Generated by [robots](https://vyos.io)
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/control.py6
-rw-r--r--python/vyos/ifconfig/operational.py2
-rw-r--r--python/vyos/logger.py16
-rw-r--r--python/vyos/range_regex.py6
-rw-r--r--python/vyos/utils/vti_updown_db.py12
5 files changed, 21 insertions, 21 deletions
diff --git a/python/vyos/ifconfig/control.py b/python/vyos/ifconfig/control.py
index 1ef42f981..03ab8959a 100644
--- a/python/vyos/ifconfig/control.py
+++ b/python/vyos/ifconfig/control.py
@@ -175,13 +175,13 @@ class Control(Section):
if convert:
value = convert(value)
- commited = self._write_sysfs(
+ committed = self._write_sysfs(
self._sysfs_set[name]['location'].format(**config), value)
- if not commited:
+ if not committed:
errmsg = self._sysfs_set.get('errormsg', '')
if errmsg:
raise TypeError(errmsg.format(**config))
- return commited
+ return committed
def get_interface(self, name):
if name in self._sysfs_get:
diff --git a/python/vyos/ifconfig/operational.py b/python/vyos/ifconfig/operational.py
index e60518948..caca40b3d 100644
--- a/python/vyos/ifconfig/operational.py
+++ b/python/vyos/ifconfig/operational.py
@@ -162,7 +162,7 @@ class Operational(Control):
stats[counter] = int(self.get_interface(counter))
return stats
- def formated_stats(self, indent=4):
+ def formatted_stats(self, indent=4):
tabs = []
stats = self.get_stats()
for rtx in self._stats_dir:
diff --git a/python/vyos/logger.py b/python/vyos/logger.py
index 207f95c1b..c9765b323 100644
--- a/python/vyos/logger.py
+++ b/python/vyos/logger.py
@@ -69,32 +69,32 @@ def getLogger(name=None, **kwargs):
def _syslog(**kwargs):
- formating = kwargs.get('format', SHORT)
+ formatting = kwargs.get('format', SHORT)
handler = handlers.SysLogHandler(
address=kwargs.get('address', '/dev/log'),
facility=kwargs.get('facility', 'syslog'),
)
- handler.setFormatter(logging.Formatter(formating))
+ handler.setFormatter(logging.Formatter(formatting))
return handler
def _stream(**kwargs):
- formating = kwargs.get('format', CLEAR)
+ formatting = kwargs.get('format', CLEAR)
handler = logging.StreamHandler(
stream=kwargs.get('stream', sys.stderr),
)
- handler.setFormatter(logging.Formatter(formating))
+ handler.setFormatter(logging.Formatter(formatting))
return handler
def _file(**kwargs):
- formating = kwargs.get('format', CLEAR)
+ formatting = kwargs.get('format', CLEAR)
handler = handlers.RotatingFileHandler(
filename=kwargs.get('filename', 1048576),
maxBytes=kwargs.get('maxBytes', 1048576),
backupCount=kwargs.get('backupCount', 3),
)
- handler.setFormatter(logging.Formatter(formating))
+ handler.setFormatter(logging.Formatter(formatting))
return handler
@@ -120,11 +120,11 @@ syslog = getLogger(
# testing
if __name__ == '__main__':
# from vyos.logger import getLogger
- formating = '%(asctime)s (%(filename)s) %(levelname)s: %(message)s'
+ formatting = '%(asctime)s (%(filename)s) %(levelname)s: %(message)s'
# syslog logger
# syslog=True if no 'address' field is provided
- syslog = getLogger(__name__ + '.1', syslog=True, format=formating)
+ syslog = getLogger(__name__ + '.1', syslog=True, format=formatting)
syslog.info('syslog test')
# steam logger
diff --git a/python/vyos/range_regex.py b/python/vyos/range_regex.py
index 81e9d2e7e..7ee9c6f08 100644
--- a/python/vyos/range_regex.py
+++ b/python/vyos/range_regex.py
@@ -34,9 +34,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 300-339: 3[0-3]\d
# 340-345: 34[0-5]
-def range_to_regex(inpt_range):
- if isinstance(inpt_range, str):
- range_list = inpt_range.split('-')
+def range_to_regex(input_range):
+ if isinstance(input_range, str):
+ range_list = input_range.split('-')
# Check input arguments
if len(range_list) == 2:
# The first element in range must be higher then the second
diff --git a/python/vyos/utils/vti_updown_db.py b/python/vyos/utils/vti_updown_db.py
index 390db5195..5453299e7 100644
--- a/python/vyos/utils/vti_updown_db.py
+++ b/python/vyos/utils/vti_updown_db.py
@@ -156,15 +156,15 @@ class VTIUpDownDB:
def setPersistentInterfaces(self, interface_list):
""" Updates the set of persistently up interfaces to match the given list """
- new_presistent_interfaces = set(interface_list)
- current_presistent_interfaces = set([ifspec for ifspec in self._ifspecs if ':' not in ifspec])
- added_presistent_interfaces = new_presistent_interfaces - current_presistent_interfaces
- removed_presistent_interfaces = current_presistent_interfaces - new_presistent_interfaces
+ new_persistent_interfaces = set(interface_list)
+ current_persistent_interfaces = set([ifspec for ifspec in self._ifspecs if ':' not in ifspec])
+ added_persistent_interfaces = new_persistent_interfaces - current_persistent_interfaces
+ removed_persistent_interfaces = current_persistent_interfaces - new_persistent_interfaces
- for interface in added_presistent_interfaces:
+ for interface in added_persistent_interfaces:
self.add(interface)
- for interface in removed_presistent_interfaces:
+ for interface in removed_persistent_interfaces:
self.remove(interface)
def commit(self, interface_dict_supplier):