Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix typos #4850

Merged
merged 4 commits into from
Feb 8, 2024
Merged

fix: Fix typos #4850

merged 4 commits into from
Feb 8, 2024

Conversation

szepeviktor
Copy link
Contributor

@szepeviktor szepeviktor commented Feb 2, 2024

Found few misspellings.

Excluded: tests/ and ChangeLog

typos config:

[files]
extend-exclude = [
    ".git/",
    "doc/rtd/spelling_word_list.txt",
    "ChangeLog",
    "tests/",
]
ignore-hidden = false

[default]
extend-ignore-re = [
    "[+0-9/A-Za-z=]{64,76}",
    '"-ba",',
    "CVE Numbering Authority \\(CNA\\)",
    '"als"',
    "32:d5:ba:4a:",
    "ami-0fecc35d3c8ba8d60",
    "\\bchage\\b",
    "\\bsystemd-localed\\b",
]

[default.extend-words]
"doas" = "doas"
"grat" = "grat"

[default.extend-identifiers]
"clen" = "clen"
"hda" = "hda"
"mybe_key" = "mybe_key"
"nd6" = "nd6"
"nd6_opts" = "nd6_opts"
"nto" = "nto"
"ser" = "ser"
"splitted" = "splitted"
"DES_EDE3_CBC" = "DES_EDE3_CBC"

@szepeviktor
Copy link
Contributor Author

Excluded: tests/ and ChangeLog

Willing contributors may continue my work.

Copy link
Collaborator

@igalic igalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would split this into commits separating code and non-code changes

@szepeviktor
Copy link
Contributor Author

code and non-code

Do messages count as code?

@szepeviktor
Copy link
Contributor Author

Done 🍏

Copy link
Collaborator

@igalic igalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I discovered a few grammar issues while reading the text surrounding the typo fixes, these are worth fixing too; you'll probably discover more if you try
  • i would break out the changes to the log messages into its own commit
  • i am very unsure about some of the code changes, have you tested this code?

@@ -661,7 +661,7 @@ def get_opensshd_version():


def get_opensshd_upstream_version():
"""Get the upstream version of the OpenSSH sshd dameon on the system.
"""Get the upstream version of the OpenSSH sshd daemon on the system.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is like automatic ATM machine

@@ -52,7 +52,7 @@
ATTACHMENT_FIELD = "Number-Attachments"

# Only the following content types can have there launch index examined
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be their

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -52,7 +52,7 @@
ATTACHMENT_FIELD = "Number-Attachments"

# Only the following content types can have there launch index examined
# in there payload, evey other content type can still provide a header
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -418,7 +418,7 @@
]
}
},
"merge_defintion": {
"merge_definition": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this not breaking everything?

@@ -70,7 +70,7 @@
"description": "The MTU size in bytes. This ``mtu`` key represents a device's Maximum Transmission Unit, which is the largest size packet or frame, specified in octets (eight-bit bytes), that can be sent in a packet- or frame-based network. Specifying ``mtu`` is optional. Values too small or too large for a device may be ignored by that device."
},
"params": {
"desciption": "The ``params`` key in a bond holds a dictionary of bonding parameters. This dictionary may be empty. For more details on what the various bonding parameters mean please read the [Linux Kernel Bonding.txt](https://www.kernel.org/doc/Documentation/networking/bonding.txt).",
"description": "The ``params`` key in a bond holds a dictionary of bonding parameters. This dictionary may be empty. For more details on what the various bonding parameters mean please read the [Linux Kernel Bonding.txt](https://www.kernel.org/doc/Documentation/networking/bonding.txt).",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how did this ever work?

@@ -840,7 +840,7 @@ def _handle_bond_bridge(self, command, cmd_type=None):
# We accept both spellings (as netplan does). LP: #1756701
# Normalize internally to the new spelling:
params = item_params.get("parameters", {})
grat_value = params.pop("gratuitious-arp", None)
grat_value = params.pop("gratuitous-arp", None)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either this will break stuff, or it was never used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here they say both versions work
https://bugs.launchpad.net/netplan/+bug/1756701

# end up in the archive).
if [ "$rev" = HEAD ] && ! git diff-index --quiet HEAD --; then
if [ -z "$SKIP_UNCOMITTED_CHANGES_CHECK" ]; then
if [ -z "$SKIP_UNCOMMITTED_CHANGES_CHECK" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is reading an external environment variable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should I do here? Revert?

@szepeviktor
Copy link
Contributor Author

have you tested this code?

I am not a cloud-init user.
This is a synthetic typo fixing PR.

@TheRealFalcon TheRealFalcon self-assigned this Feb 6, 2024
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szepeviktor , thanks for the PR!

Most of these changes look good, but there's a few things to change. They're generally misspellings we need to keep in order to not break things, or ways the change broke a linter.

If you git apply this patch, I should then be able to merge it:

diff --git a/cloudinit/config/schemas/schema-cloud-config-v1.json b/cloudinit/config/schemas/schema-cloud-config-v1.json
index 03e447b43..89ae34656 100644
--- a/cloudinit/config/schemas/schema-cloud-config-v1.json
+++ b/cloudinit/config/schemas/schema-cloud-config-v1.json
@@ -481,10 +481,10 @@
           "description": "The launch index for the specified cloud-config."
         },
         "merge_how": {
-          "$ref": "#/$defs/merge_defintion"
+          "$ref": "#/$defs/merge_definition"
         },
         "merge_type": {
-          "$ref": "#/$defs/merge_defintion"
+          "$ref": "#/$defs/merge_definition"
         }
       }
     },
diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py
index 42abe7307..9f34467be 100644
--- a/cloudinit/net/network_state.py
+++ b/cloudinit/net/network_state.py
@@ -840,7 +840,7 @@ class NetworkStateInterpreter:
             # We accept both spellings (as netplan does).  LP: #1756701
             # Normalize internally to the new spelling:
             params = item_params.get("parameters", {})
-            grat_value = params.pop("gratuitous-arp", None)
+            grat_value = params.pop("gratuitious-arp", None)
             if grat_value:
                 params["gratuitous-arp"] = grat_value
 
diff --git a/doc/rtd/explanation/instancedata.rst b/doc/rtd/explanation/instancedata.rst
index 49522d282..e7530d5fb 100644
--- a/doc/rtd/explanation/instancedata.rst
+++ b/doc/rtd/explanation/instancedata.rst
@@ -232,7 +232,7 @@ represents the data collected by ``cloudinit.util.system_info``.
 
 This is a cloud-init configuration key present in :file:`/etc/cloud/cloud.cfg`
 which describes cloud-init's configured `default_user`, `distro`, `network`
-renders, and `paths` that cloud-init will use. Not to be confused with the
+renderers, and `paths` that cloud-init will use. Not to be confused with the
 underlying host ``sys_info`` key above.
 
 ``v1``
diff --git a/packages/bddeb b/packages/bddeb
index f0399eae1..af9fbf89b 100755
--- a/packages/bddeb
+++ b/packages/bddeb
@@ -109,7 +109,8 @@ def write_debian_folder(root, templ_data, cloud_util_deps):
     # We consolidate all deps as Build-Depends as our package build runs all
     # tests so we need all runtime dependencies anyway.
     # NOTE: python package was moved to the front after debuild -S would fail
-    # with 'Please add appropriate interpreter' errors (as in debian bug 861132)
+    # with 'Please add appropriate interpreter' errors
+    # (as in debian bug 861132)
     requires.extend(["python3"] + reqs + test_reqs)
     if templ_data["debian_release"] in (
         "buster",
diff --git a/tools/make-tarball b/tools/make-tarball
index 60f1438a4..48442d0b0 100755
--- a/tools/make-tarball
+++ b/tools/make-tarball
@@ -63,7 +63,7 @@ fi
 # uncommitted changes in the working directory (because these would not
 # end up in the archive).
 if [ "$rev" = HEAD ] && ! git diff-index --quiet HEAD --; then
-    if [ -z "$SKIP_UNCOMMITTED_CHANGES_CHECK" ]; then
+    if [ -z "$SKIP_UNCOMITTED_CHANGES_CHECK" ]; then
         echo "ERROR: There are uncommitted changes in your working directory." >&2
         exit 1
     else
diff --git a/tools/read-dependencies b/tools/read-dependencies
index 545233874..a3b2d7388 100755
--- a/tools/read-dependencies
+++ b/tools/read-dependencies
@@ -224,8 +224,8 @@ def translate_pip_to_system_pkg(pip_requires, renames):
     """Translate pip package names to distro-specific package names.
 
     @param pip_requires: List of versionless pip package names to translate.
-    @param renames: Dict containing special case renames from pip name to system
-        package name for the distro.
+    @param renames: Dict containing special case renames from pip name to
+        system package name for the distro.
     """
     prefix = "python3-"
     standard_pkg_name = "{0}{1}"

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Feb 6, 2024

@TheRealFalcon It was so hard I had to use a computer 🙃

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @szepeviktor .

Just a heads up that most cloud-init contributions require signing a CLA. Since these changes were spelling only, it's not required in this case, but I just wanted to make you aware that we'll need it if you plan to contribute code in the future.

@TheRealFalcon TheRealFalcon merged commit fdefe08 into canonical:main Feb 8, 2024
28 of 29 checks passed
@szepeviktor
Copy link
Contributor Author

Thank you!
https://launchpad.net/~contributor-agreement-canonical lists me under "Latest members"

@szepeviktor szepeviktor deleted the typos branch February 8, 2024 16:16
blackboxsw pushed a commit that referenced this pull request Feb 15, 2024
blackboxsw pushed a commit that referenced this pull request Feb 15, 2024
blackboxsw pushed a commit that referenced this pull request Feb 16, 2024
blackboxsw pushed a commit that referenced this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants