Skip to content

Commit a67a342

Browse files
Fix typos (#489)
Fix typos Fix typos in docs and comments. May I also recommend the use of https://github.com/crate-ci/typos/blob/master/docs/pre-commit.md and https://github.com/crate-ci/typos/blob/master/docs/github-action.md to prevent future occurrences? :) Happy to submit a pull for these if you'd like. Reviewed-by: gemini-code-assist[bot] Reviewed-by: Nikola Forró
2 parents 1eb3c14 + 5c3caf8 commit a67a342

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373
# 0.30.0
7474

75-
- Fixed an exception that occured when accessing the `Specfile.has_autochangelog` property while having unparseable lines (e.g. lines ending with unescaped `%`) in `%changelog`. (#387)
75+
- Fixed an exception that occurred when accessing the `Specfile.has_autochangelog` property while having unparsable lines (e.g. lines ending with unescaped `%`) in `%changelog`. (#387)
7676

7777
# 0.29.0
7878

@@ -85,7 +85,7 @@
8585

8686
# 0.28.2
8787

88-
- Handling of trailing newlines in the macro defintions has been improved. (#361)
88+
- Handling of trailing newlines in the macro definitions has been improved. (#361)
8989

9090
# 0.28.1
9191

@@ -184,7 +184,7 @@
184184

185185
# 0.13.2
186186

187-
- Fixed infinite loop that occured when section options were followed by whitespace. (#197)
187+
- Fixed infinite loop that occurred when section options were followed by whitespace. (#197)
188188

189189
# 0.13.1
190190

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Main focus is on modifying existing spec files, any change should result in a mi
55

66
## Installation
77

8-
The library is packaged for Fedora, EPEL 9 and EPEL 8 and you can simply instal it with dnf:
8+
The library is packaged for Fedora, EPEL 9 and EPEL 8 and you can simply install it with dnf:
99

1010
```bash
1111
dnf install python3-specfile

specfile/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MacroRemovalException(SpecfileException):
2828

2929

3030
class OptionsException(SpecfileException):
31-
"""Unparseable option string."""
31+
"""Unparsable option string."""
3232

3333

3434
class UnterminatedMacroException(SpecfileException):

specfile/macro_definitions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def get(self, name: str, position: Optional[int] = None) -> MacroDefinition:
253253
def find(self, name: str, position: Optional[int] = None) -> int:
254254
"""
255255
Finds a macro definition with the specified name. If position is not specified,
256-
returns the first valid matching macro definiton. If there is no such macro
256+
returns the first valid matching macro definition. If there is no such macro
257257
definition, returns the first match, if any. If position is specified and there is
258258
a matching macro definition at that position, it is returned, otherwise
259259
`ValueError` is raised.
@@ -287,7 +287,7 @@ def _parse(
287287
cls, lines: Union[List[str], List[Tuple[str, bool]]]
288288
) -> "MacroDefinitions":
289289
"""
290-
Parses given lines into macro defintions.
290+
Parses given lines into macro definitions.
291291
292292
Args:
293293
lines: Lines to parse.
@@ -379,7 +379,7 @@ def parse(
379379
context: Optional["Specfile"] = None,
380380
) -> "MacroDefinitions":
381381
"""
382-
Parses given lines into macro defintions.
382+
Parses given lines into macro definitions.
383383
384384
Args:
385385
lines: Lines to parse.

specfile/specfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ def contains_autochangelog(section: Section) -> bool:
561561
):
562562
return True
563563
except UnterminatedMacroException:
564-
# ignore unparseable lines
564+
# ignore unparsable lines
565565
continue
566566
return False
567567

specfile/tags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232
def get_tag_name_regex(name: str) -> str:
33-
"""Contructs regex corresponding to the specified tag name."""
33+
"""Constructs regex corresponding to the specified tag name."""
3434
regex = re.escape(name)
3535
if name in TAGS_WITH_ARG:
3636
regex += r"(?:\s*\(\s*[^\s)]*\s*\))?"

tests/unit/test_macro_definitions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_parse():
108108
"",
109109
"%define example() %{expand:",
110110
"This an example of a macro definition with body ",
111-
"spawning across mutiple lines}",
111+
"spawning across multiple lines}",
112112
]
113113
)
114114
assert macro_definitions[0].name == "gitdate"
@@ -141,7 +141,7 @@ def test_parse():
141141
assert macro_definitions[-1].body == (
142142
"%{expand:\n"
143143
"This an example of a macro definition with body \n"
144-
"spawning across mutiple lines}"
144+
"spawning across multiple lines}"
145145
)
146146

147147

@@ -231,7 +231,7 @@ def test_get_raw_data():
231231
"example()",
232232
"%{expand:\n"
233233
"This an example of a macro definition with body \n"
234-
"spawning across mutiple lines}",
234+
"spawning across multiple lines}",
235235
False,
236236
False,
237237
CommentOutStyle.DNL,
@@ -269,7 +269,7 @@ def test_get_raw_data():
269269
"",
270270
"%define example() %{expand:",
271271
"This an example of a macro definition with body ",
272-
"spawning across mutiple lines}",
272+
"spawning across multiple lines}",
273273
"%global trailing_newline \\",
274274
"body with trailing newline \\",
275275
"",

0 commit comments

Comments
 (0)